Skip to main content

MessageReader

Trait MessageReader 

Source
pub trait MessageReader: Send {
    type Error: Error + Send + Sync + 'static;

    // Required methods
    fn next(
        &mut self,
    ) -> impl Future<Output = Result<Option<Vec<u8>>, Self::Error>> + Send;
    fn cancel(&mut self);
}
Expand description

Frames are already transport-decoded protobuf messages. Implementations enforce negotiated byte limits before allocating/decoding a frame body.

Required Associated Types§

Source

type Error: Error + Send + Sync + 'static

Required Methods§

Source

fn next( &mut self, ) -> impl Future<Output = Result<Option<Vec<u8>>, Self::Error>> + Send

Source

fn cancel(&mut self)

Stops observation; it does not cancel a durable server operation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§