[][src]Struct canonical_host::Wasm

pub struct Wasm<State, S: Store> { /* fields omitted */ }

A type with a corresponding wasm module

Implementations

impl<State, S> Wasm<State, S> where
    State: Canon<S>,
    S: Store,
    S::Error: HostError,
    S::Error: From<Signal>, 
[src]

pub fn new(state: State, bytecode: &[u8]) -> Self[src]

Creates a new Wasm wrapper over an initial state.

pub fn query<A, R, E>(
    &self,
    query: &Query<A, R>,
    store: S,
    resolver: E
) -> Result<R, S::Error> where
    A: Canon<S>,
    R: Canon<S>,
    S::Error: From<Error>,
    E: ExternalsResolver
[src]

Perform the provided query in the wasm module

pub fn transact<A, R, E>(
    &mut self,
    transaction: &Transaction<A, R>,
    store: S,
    resolver: E
) -> Result<R, S::Error> where
    A: Canon<S>,
    R: Canon<S>,
    S::Error: HostError,
    S::Error: From<Signal>,
    S::Error: From<Error>,
    E: ExternalsResolver
[src]

Perform the provided transaction in the wasm module

Trait Implementations

impl<State: Canon<S>, S: Store + Canon<S>> Canon<S> for Wasm<State, S>[src]

impl<State: Clone, S: Clone + Store> Clone for Wasm<State, S>[src]

impl<S, State> Debug for Wasm<State, S> where
    State: Debug,
    S: Store
[src]

Auto Trait Implementations

impl<State, S> RefUnwindSafe for Wasm<State, S> where
    S: RefUnwindSafe,
    State: RefUnwindSafe
[src]

impl<State, S> Send for Wasm<State, S> where
    S: Send,
    State: Send
[src]

impl<State, S> Sync for Wasm<State, S> where
    S: Sync,
    State: Sync
[src]

impl<State, S> Unpin for Wasm<State, S> where
    S: Unpin,
    State: Unpin
[src]

impl<State, S> UnwindSafe for Wasm<State, S> where
    S: UnwindSafe,
    State: UnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Erased for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,