Skip to main content

FrameSource

Trait FrameSource 

Source
pub trait FrameSource {
    // Required methods
    fn recv<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Frame>, TransportError>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn peer(&self) -> String;
}
Expand description

Read half of a split Transport.

Required Methods§

Source

fn recv<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Option<Frame>, TransportError>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Receive the next frame. Ok(None) signals a clean end of stream.

Source

fn peer(&self) -> String

Human-readable peer description for logs.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§