WrpcCtx

Trait WrpcCtx 

Source
pub trait WrpcCtx<T: Invoke>: Send {
    // Required methods
    fn context(&self) -> T::Context;
    fn client(&self) -> &T;
    fn shared_resources(&mut self) -> &mut SharedResourceTable;

    // Provided method
    fn timeout(&self) -> Option<Duration> { ... }
}

Required Methods§

Source

fn context(&self) -> T::Context

Returns context to use for invocation

Source

fn client(&self) -> &T

Returns an Invoke implementation used to satisfy polyfilled imports

Source

fn shared_resources(&mut self) -> &mut SharedResourceTable

Returns a table of shared exported resources

Provided Methods§

Source

fn timeout(&self) -> Option<Duration>

Optional invocation timeout, component will trap if invocation is not finished within the returned Duration. If this method returns None, then no timeout will be used.

Implementors§