Struct wasmer_wasix::state::handles::thread_local::WasiInstanceGuardMut
source · pub(crate) struct WasiInstanceGuardMut<'a> {
borrow: RefMut<'static, WasiInstanceHandles>,
_pointer: &'a WasiInstanceHandlesPointer,
_inner: Rc<RefCell<WasiInstanceHandles>>,
}
Expand description
This non-sendable guard provides memory safe access to the WasiInstance object but only when it is constructed with certain constraints. This one provides mutable access
Fields§
§borrow: RefMut<'static, WasiInstanceHandles>
§_pointer: &'a WasiInstanceHandlesPointer
§_inner: Rc<RefCell<WasiInstanceHandles>>
Methods from Deref<Target = WasiInstanceHandles>§
pub fn module(&self) -> &Module
pub fn module_clone(&self) -> Module
sourcepub fn memory_view<'a>(
&'a self,
store: &'a (impl AsStoreRef + ?Sized),
) -> MemoryView<'a>
pub fn memory_view<'a>( &'a self, store: &'a (impl AsStoreRef + ?Sized), ) -> MemoryView<'a>
Providers safe access to the memory (it must be initialized before it can be used)
sourcepub fn memory(&self) -> &Memory
pub fn memory(&self) -> &Memory
Providers safe access to the memory (it must be initialized before it can be used)
sourcepub fn memory_clone(&self) -> Memory
pub fn memory_clone(&self) -> Memory
Copy the lazy reference so that when it’s initialized during the export phase, all the other references get a copy of it
pub fn instance(&self) -> &Instance
Trait Implementations§
source§impl<'a> DerefMut for WasiInstanceGuardMut<'a>
impl<'a> DerefMut for WasiInstanceGuardMut<'a>
Auto Trait Implementations§
impl<'a> Freeze for WasiInstanceGuardMut<'a>
impl<'a> !RefUnwindSafe for WasiInstanceGuardMut<'a>
impl<'a> !Send for WasiInstanceGuardMut<'a>
impl<'a> !Sync for WasiInstanceGuardMut<'a>
impl<'a> Unpin for WasiInstanceGuardMut<'a>
impl<'a> !UnwindSafe for WasiInstanceGuardMut<'a>
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.
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 more§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>
Returns the layout of the type.