Trait wasmbus_rpc::common::Transport
source · [−]pub trait Transport: Send {
fn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
req: Message<'life2>,
opts: Option<SendOpts>
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, RpcError>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
fn set_timeout(&self, interval: Duration);
}
Expand description
Transport determines how messages are sent Alternate implementations could be mock-server, or test-fuzz-server / test-fuzz-client
Required methods
fn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ctx: &'life1 Context,
req: Message<'life2>,
opts: Option<SendOpts>
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, RpcError>> + Send + 'async_trait>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn set_timeout(&self, interval: Duration)
fn set_timeout(&self, interval: Duration)
Sets rpc timeout