Struct wasmbus_rpc::provider::ProviderTransport
source · [−]pub struct ProviderTransport<'send> {
pub bridge: &'send HostBridge,
pub ld: &'send LinkDefinition,
/* private fields */
}
Fields
bridge: &'send HostBridge
ld: &'send LinkDefinition
Implementations
sourceimpl<'send> ProviderTransport<'send>
impl<'send> ProviderTransport<'send>
sourcepub fn new(ld: &'send LinkDefinition, bridge: Option<&'send HostBridge>) -> Self
pub fn new(ld: &'send LinkDefinition, bridge: Option<&'send HostBridge>) -> Self
constructs a ProviderTransport with the LinkDefinition and bridge. If the bridge parameter is None, the current (static) bridge is used.
sourcepub fn new_with_timeout(
ld: &'send LinkDefinition,
bridge: Option<&'send HostBridge>,
timeout: Option<Duration>
) -> Self
pub fn new_with_timeout(
ld: &'send LinkDefinition,
bridge: Option<&'send HostBridge>,
timeout: Option<Duration>
) -> Self
constructs a ProviderTransport with the LinkDefinition, bridge, and an optional rpc timeout. If the bridge parameter is None, the current (static) bridge is used.
Trait Implementations
sourceimpl<'send> Transport for ProviderTransport<'send>
impl<'send> Transport for ProviderTransport<'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,
sourcefn set_timeout(&self, interval: Duration)
fn set_timeout(&self, interval: Duration)
Sets rpc timeout
Auto Trait Implementations
impl<'send> !RefUnwindSafe for ProviderTransport<'send>
impl<'send> Send for ProviderTransport<'send>
impl<'send> Sync for ProviderTransport<'send>
impl<'send> Unpin for ProviderTransport<'send>
impl<'send> !UnwindSafe for ProviderTransport<'send>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more