Skip to main content

Transport

Trait Transport 

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

Frame-level channel with no JSON-RPC semantics.

Required Methods§

Source

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

Source

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

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§