[][src]Struct canonical_host::Wasm

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

A type with a corresponding wasm module

Implementations

impl<State, S> Wasm<State, S> where
    State: Canon<S> + Module + Debug,
    S: Store,
    S::Error: HostError
[src]

pub fn new(state: State) -> Self[src]

Creates a new Wasm wrapper over an initial state.

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

Perform the provided query in the wasm module

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

Perform the provided transaction in the wasm module

Trait Implementations

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

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

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

Auto Trait Implementations

impl<State, S> RefUnwindSafe for Wasm<State, S> where
    S: RefUnwindSafe,
    State: RefUnwindSafe

impl<State, S> Send for Wasm<State, S> where
    S: Send,
    State: Send

impl<State, S> Sync for Wasm<State, S> where
    S: Sync,
    State: Sync

impl<State, S> Unpin for Wasm<State, S> where
    S: Unpin,
    State: Unpin

impl<State, S> UnwindSafe for Wasm<State, S> where
    S: UnwindSafe,
    State: UnwindSafe

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> 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.