wrpc_runtime_wasmtime

Trait WrpcView

source
pub trait WrpcView: Send {
    type Invoke: Invoke;

    // Required methods
    fn client(&self) -> &Self::Invoke;
    fn shared_resources(&mut self) -> &mut SharedResourceTable;

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

Required Associated Types§

Required Methods§

source

fn client(&self) -> &Self::Invoke

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§