Struct wasmer::FunctionEnv
source · #[repr(transparent)]pub struct FunctionEnv<T> { /* private fields */ }
Expand description
An opaque reference to a function environment.
The function environment data is owned by the Store
.
Implementations§
source§impl<T> FunctionEnv<T>
impl<T> FunctionEnv<T>
sourcepub fn new(store: &mut impl AsStoreMut, value: T) -> Selfwhere
T: Any + Send + 'static + Sized,
pub fn new(store: &mut impl AsStoreMut, value: T) -> Selfwhere
T: Any + Send + 'static + Sized,
Make a new FunctionEnv
sourcepub fn as_ref<'a>(&self, store: &'a impl AsStoreRef) -> &'a Twhere
T: Any + Send + 'static + Sized,
pub fn as_ref<'a>(&self, store: &'a impl AsStoreRef) -> &'a Twhere
T: Any + Send + 'static + Sized,
Get the data as reference
sourcepub fn as_mut<'a>(&self, store: &'a mut impl AsStoreMut) -> &'a mut Twhere
T: Any + Send + 'static + Sized,
pub fn as_mut<'a>(&self, store: &'a mut impl AsStoreMut) -> &'a mut Twhere
T: Any + Send + 'static + Sized,
Get the data as mutable
sourcepub fn into_mut(self, store: &mut impl AsStoreMut) -> FunctionEnvMut<'_, T>where
T: Any + Send + 'static + Sized,
pub fn into_mut(self, store: &mut impl AsStoreMut) -> FunctionEnvMut<'_, T>where
T: Any + Send + 'static + Sized,
Convert it into a FunctionEnvMut
Trait Implementations§
source§impl<T> Clone for FunctionEnv<T>
impl<T> Clone for FunctionEnv<T>
source§impl<T: Debug> Debug for FunctionEnv<T>
impl<T: Debug> Debug for FunctionEnv<T>
source§impl<T> Hash for FunctionEnv<T>
impl<T> Hash for FunctionEnv<T>
source§impl<T> PartialEq<FunctionEnv<T>> for FunctionEnv<T>
impl<T> PartialEq<FunctionEnv<T>> for FunctionEnv<T>
impl<T> Eq for FunctionEnv<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for FunctionEnv<T>where
T: RefUnwindSafe,
impl<T> Send for FunctionEnv<T>where
T: Send,
impl<T> Sync for FunctionEnv<T>where
T: Sync,
impl<T> Unpin for FunctionEnv<T>where
T: Unpin,
impl<T> UnwindSafe for FunctionEnv<T>where
T: UnwindSafe,
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<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
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.