Trait ockam_transport_core::Transport
source · 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§
sourcefn transport_type(&self) -> TransportType
fn transport_type(&self) -> TransportType
Return the type of the Transport
sourcefn 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 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