Skip to main content

JsonPacketStream

Trait JsonPacketStream 

Source
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§

Source

fn write_json_packet<T: Serialize>( &mut self, message: &T, ) -> Result<(), ActorError>

Source

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§

Source§

impl JsonPacketStream for ClientRequest<'_, '_>

Actors can also send other messages before replying to a request.

Source§

impl JsonPacketStream for DevtoolsConnection