pub trait JsonPacketStream {
// Required methods
fn write_json_packet<T: Serialize>(
&mut self,
message: &T,
) -> Result<(), ActorError>;
fn read_json_packet(&mut self) -> Result<Option<Value>, String>;
}Required Methods§
fn write_json_packet<T: Serialize>( &mut self, message: &T, ) -> Result<(), ActorError>
fn read_json_packet(&mut self) -> Result<Option<Value>, String>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl JsonPacketStream for ClientRequest<'_, '_>
Actors can also send other messages before replying to a request.