[−][src]Struct canonical_host::Wasm
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]
State: Canon<S> + Module + Debug,
S: Store,
S::Error: HostError,
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]
&self,
query: &Query<A, R>,
store: S
) -> Result<Result<R, S::Error>, Error> where
A: Canon<S>,
R: Canon<S>,
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]
&mut self,
transaction: &Transaction<A, R>,
store: S
) -> Result<Result<R, S::Error>, Error> where
A: Canon<S>,
R: Canon<S>,
S::Error: HostError,
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]
fn write(&self, sink: &mut impl Sink<S>) -> Result<(), S::Error>
[src]
fn read(source: &mut impl Source<S>) -> Result<Self, S::Error>
[src]
fn encoded_len(&self) -> usize
[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,
S: RefUnwindSafe,
State: RefUnwindSafe,
impl<State, S> Send for Wasm<State, S> where
S: Send,
State: Send,
S: Send,
State: Send,
impl<State, S> Sync for Wasm<State, S> where
S: Sync,
State: Sync,
S: Sync,
State: Sync,
impl<State, S> Unpin for Wasm<State, S> where
S: Unpin,
State: Unpin,
S: Unpin,
State: Unpin,
impl<State, S> UnwindSafe for Wasm<State, S> where
S: UnwindSafe,
State: UnwindSafe,
S: UnwindSafe,
State: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,