pub struct Runtime { /* private fields */ }Expand description
The package runtime
Implementations§
Source§impl Runtime
impl Runtime
pub fn new() -> Self
Sourcepub fn load_module(
&self,
wasm_bytes: &[u8],
) -> Result<CompiledModule<'_>, RuntimeError>
pub fn load_module( &self, wasm_bytes: &[u8], ) -> Result<CompiledModule<'_>, RuntimeError>
Load a WASM module from bytes
pub fn decode_arg( &self, types: &[TypeDef], bytes: &[u8], ty: &Type, ) -> Result<Value, RuntimeError>
pub fn encode_result(&self, value: &Value) -> Result<Vec<u8>, RuntimeError>
pub fn encode_result_with_schema( &self, types: &[TypeDef], value: &Value, ty: &Type, ) -> Result<Vec<u8>, RuntimeError>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Runtime
impl !UnwindSafe for Runtime
impl Freeze for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl UnsafeUnpin for Runtime
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more