IP2PFrame

Trait IP2PFrame 

Source
pub trait IP2PFrame<M>: Send + 'static {
    // Required method
    fn read_to_end<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<M>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn into_dyn(self) -> DynIP2PFrame<M>
       where Self: Sized { ... }
}

Required Methods§

Source

fn read_to_end<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<M>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Read the entire frame from the connection and deserialize it into a message. This is not required to be cancel-safe.

Provided Methods§

Source

fn into_dyn(self) -> DynIP2PFrame<M>
where Self: Sized,

Implementations on Foreign Types§

Source§

impl<M> IP2PFrame<M> for BytesMut
where M: Decodable + DeserializeOwned + Send + 'static,

Implementations of the IP2PFrame and IP2PConnection traits for TLS

Source§

fn read_to_end<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<M>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl<M> IP2PFrame<M> for RecvStream
where M: Decodable + DeserializeOwned + Send + 'static,

Implementations of the IP2PFrame and IP2PConnection traits for Iroh

Source§

fn read_to_end<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<M>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§