Struct linera_witty::wasmer::FunctionEnvMut
source · pub struct FunctionEnvMut<'a, T>where
T: 'a,{ /* private fields */ }
Expand description
A temporary handle to a FunctionEnv
.
Implementations§
source§impl<T> FunctionEnvMut<'_, T>where
T: 'static,
impl<T> FunctionEnvMut<'_, T>where
T: 'static,
sourcepub fn data_mut(&mut self) -> &mut T
pub fn data_mut(&mut self) -> &mut T
Returns a mutable- reference to the host state in this function environement.
sourcepub fn as_ref(&self) -> FunctionEnv<T>
pub fn as_ref(&self) -> FunctionEnv<T>
Borrows a new immmutable reference
sourcepub fn as_mut(&mut self) -> FunctionEnvMut<'_, T>
pub fn as_mut(&mut self) -> FunctionEnvMut<'_, T>
Borrows a new mutable reference
sourcepub fn data_and_store_mut(&mut self) -> (&mut T, StoreMut<'_>)
pub fn data_and_store_mut(&mut self) -> (&mut T, StoreMut<'_>)
Borrows a new mutable reference of both the attached Store and host state
Trait Implementations§
source§impl<T> AsStoreMut for FunctionEnvMut<'_, T>
impl<T> AsStoreMut for FunctionEnvMut<'_, T>
source§fn as_store_mut(&mut self) -> StoreMut<'_>
fn as_store_mut(&mut self) -> StoreMut<'_>
Returns a
StoreMut
pointing to the underlying context.source§fn objects_mut(&mut self) -> &mut StoreObjects
fn objects_mut(&mut self) -> &mut StoreObjects
Returns the ObjectMutable
source§impl<T> AsStoreRef for FunctionEnvMut<'_, T>
impl<T> AsStoreRef for FunctionEnvMut<'_, T>
source§fn as_store_ref(&self) -> StoreRef<'_>
fn as_store_ref(&self) -> StoreRef<'_>
Returns a
StoreRef
pointing to the underlying context.source§impl<'a, T> Debug for FunctionEnvMut<'a, T>where
T: Debug + 'static,
impl<'a, T> Debug for FunctionEnvMut<'a, T>where
T: Debug + 'static,
source§impl<UserData: 'static> RuntimeMemory<FunctionEnvMut<'_, Environment<UserData>>> for Memory
impl<UserData: 'static> RuntimeMemory<FunctionEnvMut<'_, Environment<UserData>>> for Memory
source§fn read<'instance>(
&self,
instance: &'instance ReentrantInstance<'_, UserData>,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance ReentrantInstance<'_, UserData>, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads
length
bytes from memory from the provided location
.source§fn write(
&mut self,
instance: &mut ReentrantInstance<'_, UserData>,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut ReentrantInstance<'_, UserData>, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the
bytes
to memory at the provided location
.Auto Trait Implementations§
impl<'a, T> Freeze for FunctionEnvMut<'a, T>
impl<'a, T> !RefUnwindSafe for FunctionEnvMut<'a, T>
impl<'a, T> !Send for FunctionEnvMut<'a, T>
impl<'a, T> !Sync for FunctionEnvMut<'a, T>
impl<'a, T> Unpin for FunctionEnvMut<'a, T>where
T: Unpin,
impl<'a, T> !UnwindSafe for FunctionEnvMut<'a, T>
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§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.
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<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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>
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 moresource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§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.
source§impl<T> MockResults for T
impl<T> MockResults for T
§type Results = T
type Results = T
The mock native type of the results for the
MockInstance
.source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length
bytes from memory from the provided location
.
source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes
to memory at the provided location
.