TransportMiddleware

Trait TransportMiddleware 

Source
pub trait TransportMiddleware: Send + Sync {
    // Required methods
    fn process_outgoing<'life0, 'life1, 'async_trait>(
        &'life0 self,
        message: &'life1 mut JsonRpcMessage,
    ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn process_incoming<'life0, 'life1, 'async_trait>(
        &'life0 self,
        message: &'life1 mut JsonRpcMessage,
    ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
}
Expand description

Middleware trait for HTTP transport

Required Methods§

Source

fn process_outgoing<'life0, 'life1, 'async_trait>( &'life0 self, message: &'life1 mut JsonRpcMessage, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Process outgoing message

Source

fn process_incoming<'life0, 'life1, 'async_trait>( &'life0 self, message: &'life1 mut JsonRpcMessage, ) -> Pin<Box<dyn Future<Output = Result<(), TransportError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Process incoming message

Implementors§