Struct rings_node::backend::extension::MaybeBackendMessage
source · pub struct MaybeBackendMessage(/* private fields */);
Expand description
Wrapper for BackendMessage that can be converted from and to the native WebAssembly type.
Implementations§
source§impl MaybeBackendMessage
impl MaybeBackendMessage
sourcepub fn msg_type(
env: FunctionEnvMut<'_, MaybeBackendMessage>,
v: &[Value]
) -> Result<Vec<Value>, RuntimeError>
pub fn msg_type( env: FunctionEnvMut<'_, MaybeBackendMessage>, v: &[Value] ) -> Result<Vec<Value>, RuntimeError>
wasm function type Fn (Option<ExternalRef>) -> I32
, external ref is always pointed to Env
sourcepub fn extra(
env: FunctionEnvMut<'_, MaybeBackendMessage>,
v: &[Value]
) -> Result<Vec<Value>, RuntimeError>
pub fn extra( env: FunctionEnvMut<'_, MaybeBackendMessage>, v: &[Value] ) -> Result<Vec<Value>, RuntimeError>
wasm function type Fn (Option<ExternalRef>) -> [I32; 30]
, external ref is always pointed to Env
sourcepub fn data(
env: FunctionEnvMut<'_, MaybeBackendMessage>,
v: &[Value]
) -> Result<Vec<Value>, RuntimeError>
pub fn data( env: FunctionEnvMut<'_, MaybeBackendMessage>, v: &[Value] ) -> Result<Vec<Value>, RuntimeError>
wasm function type Fn (Option<ExternalRef>) -> \[I32\]
, external ref is always pointed to Env
sourcepub fn read_at(
env: FunctionEnvMut<'_, MaybeBackendMessage>,
params: &[Value]
) -> Result<Vec<Value>, RuntimeError>
pub fn read_at( env: FunctionEnvMut<'_, MaybeBackendMessage>, params: &[Value] ) -> Result<Vec<Value>, RuntimeError>
wasm function type Fn (Option<ExternalRef>, i32) -> \[i32\]
, external ref is always pointed to Env
sourcepub fn write_at(
env: FunctionEnvMut<'_, MaybeBackendMessage>,
params: &[Value]
) -> Result<Vec<Value>, RuntimeError>
pub fn write_at( env: FunctionEnvMut<'_, MaybeBackendMessage>, params: &[Value] ) -> Result<Vec<Value>, RuntimeError>
wasm function type Fn (Option<ExternalRef>, i32) -> \[i32\]
, external ref is always pointed to Env
source§impl MaybeBackendMessage
impl MaybeBackendMessage
sourcepub fn wrap(&self, msg: BackendMessage) -> Result<()>
pub fn wrap(&self, msg: BackendMessage) -> Result<()>
Ask the instance to wrap a new backend message;
Trait Implementations§
source§impl Clone for MaybeBackendMessage
impl Clone for MaybeBackendMessage
source§fn clone(&self) -> MaybeBackendMessage
fn clone(&self) -> MaybeBackendMessage
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for MaybeBackendMessage
impl Debug for MaybeBackendMessage
source§impl Default for MaybeBackendMessage
impl Default for MaybeBackendMessage
source§fn default() -> MaybeBackendMessage
fn default() -> MaybeBackendMessage
Returns the “default value” for a type. Read more
source§impl From<BackendMessage> for MaybeBackendMessage
impl From<BackendMessage> for MaybeBackendMessage
source§fn from(msg: BackendMessage) -> Self
fn from(msg: BackendMessage) -> Self
Converts to this type from the input type.
source§impl FromToNativeWasmType for MaybeBackendMessage
impl FromToNativeWasmType for MaybeBackendMessage
source§fn from_native(native: Self::Native) -> Self
fn from_native(native: Self::Native) -> Self
source§fn is_from_store(&self, _store: &impl AsStoreRef) -> bool
fn is_from_store(&self, _store: &impl AsStoreRef) -> bool
Returns whether the given value is from the given store. Read more
source§impl WasmABILander for MaybeBackendMessage
impl WasmABILander for MaybeBackendMessage
source§fn land_abi(env: &FunctionEnv<Self>, store: &mut impl AsStoreMut) -> Imports
fn land_abi(env: &FunctionEnv<Self>, store: &mut impl AsStoreMut) -> Imports
The land_abi function needs to return an ImportObject.
read more: https://developer.mozilla.org/en-US/docs/WebAssembly/JavaScript_interface/instantiate
Auto Trait Implementations§
impl RefUnwindSafe for MaybeBackendMessage
impl Send for MaybeBackendMessage
impl Sync for MaybeBackendMessage
impl Unpin for MaybeBackendMessage
impl UnwindSafe for MaybeBackendMessage
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
§impl<'a, T> AsTaggedExplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedExplicit<'a> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere T: 'a,
§impl<'a, T> AsTaggedImplicit<'a> for Twhere
T: 'a,
impl<'a, T> AsTaggedImplicit<'a> for Twhere T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere T: 'a,
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
§impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
§fn deserialize(
&self,
deserializer: &mut D
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D ) -> Result<With<T, W>, <D as Fallible>::Error>
Deserializes using the given deserializer
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Upcastable for Twhere
T: Any + Send + Sync + 'static,
impl<T> Upcastable for Twhere T: Any + Send + Sync + 'static,
§fn upcast_any_ref(&self) -> &(dyn Any + 'static)
fn upcast_any_ref(&self) -> &(dyn Any + 'static)
upcast ref
§fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn upcast_any_mut(&mut self) -> &mut (dyn Any + 'static)
upcast mut ref
source§impl<A1> WasmTypeList for A1where
A1: FromToNativeWasmType,
impl<A1> WasmTypeList for A1where A1: FromToNativeWasmType,
source§unsafe fn from_array(
_store: &mut impl AsStoreMut,
array: <A1 as WasmTypeList>::Array
) -> A1
unsafe fn from_array( _store: &mut impl AsStoreMut, array: <A1 as WasmTypeList>::Array ) -> A1
Constructs
Self
based on an array of values. Read moresource§unsafe fn from_slice(
store: &mut impl AsStoreMut,
slice: &[RawValue]
) -> Result<A1, TryFromSliceError>
unsafe fn from_slice( store: &mut impl AsStoreMut, slice: &[RawValue] ) -> Result<A1, TryFromSliceError>
Constructs
Self
based on a slice of values. Read moresource§unsafe fn into_array(
self,
_store: &mut impl AsStoreMut
) -> <A1 as WasmTypeList>::Array
unsafe fn into_array( self, _store: &mut impl AsStoreMut ) -> <A1 as WasmTypeList>::Array
Builds and returns an array of type
Array
from a tuple
(list) of values. Read moresource§fn empty_array() -> <A1 as WasmTypeList>::Array
fn empty_array() -> <A1 as WasmTypeList>::Array
Allocates and return an empty array of type
Array
that
will hold a tuple (list) of values, usually to hold the
returned values of a WebAssembly function call.source§unsafe fn from_c_struct(
_store: &mut impl AsStoreMut,
c_struct: <A1 as WasmTypeList>::CStruct
) -> A1
unsafe fn from_c_struct( _store: &mut impl AsStoreMut, c_struct: <A1 as WasmTypeList>::CStruct ) -> A1
Builds a tuple (list) of values from a C struct of type
CStruct
. Read moresource§unsafe fn into_c_struct(
self,
_store: &mut impl AsStoreMut
) -> <A1 as WasmTypeList>::CStruct
unsafe fn into_c_struct( self, _store: &mut impl AsStoreMut ) -> <A1 as WasmTypeList>::CStruct
Builds and returns a C struct of type
CStruct
from a
tuple (list) of values. Read moresource§unsafe fn write_c_struct_to_ptr(
c_struct: <A1 as WasmTypeList>::CStruct,
_ptr: *mut RawValue
)
unsafe fn write_c_struct_to_ptr( c_struct: <A1 as WasmTypeList>::CStruct, _ptr: *mut RawValue )
Writes the contents of a C struct to an array of
RawValue
. Read moresource§fn wasm_types() -> &'static [Type]
fn wasm_types() -> &'static [Type]
Get the Wasm types for the tuple (list) of currently
represented values.