pub trait Transport: Send + Sync + 'static {
    // Required methods
    fn transport_type(&self) -> TransportType;
    fn resolve_address<'life0, 'async_trait>(
        &'life0 self,
        address: Address
    ) -> Pin<Box<dyn Future<Output = Result<Address>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn disconnect<'life0, 'async_trait>(
        &'life0 self,
        address: Address
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

source

fn transport_type(&self) -> TransportType

Return the type of the Transport

source

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

Instantiate transport workers for in order to communicate with a remote address and return the local address of the transport worker

source

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

Stop all workers and free all resources associated with the connection

Implementors§