pub(crate) struct WasiInstanceGuardMut<'a> {
borrow: RefMut<'static, WasiModuleTreeHandles>,
_pointer: &'a WasiInstanceHandlesPointer,
_inner: Rc<RefCell<WasiModuleTreeHandles>>,
}
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, WasiModuleTreeHandles>
§_pointer: &'a WasiInstanceHandlesPointer
§_inner: Rc<RefCell<WasiModuleTreeHandles>>
Methods from Deref<Target = WasiModuleTreeHandles>§
Sourcepub(crate) fn main_module_instance_handles(&self) -> &WasiModuleInstanceHandles
pub(crate) fn main_module_instance_handles(&self) -> &WasiModuleInstanceHandles
Can be used to get the WasiModuleInstanceHandles
of the main module.
If access to the side modules’ instance handles is required, one must go
through the Linker
to retrieve the one they need.
Sourcepub(crate) fn main_module_instance_handles_mut(
&mut self,
) -> &mut WasiModuleInstanceHandles
pub(crate) fn main_module_instance_handles_mut( &mut self, ) -> &mut WasiModuleInstanceHandles
See comments on main_module_instance_handles
.
Sourcepub(crate) fn static_module_instance_handles(
&self,
) -> Option<&WasiModuleInstanceHandles>
pub(crate) fn static_module_instance_handles( &self, ) -> Option<&WasiModuleInstanceHandles>
Helper function to get the instance handles of a static module, or fail otherwise. See comments on ensure_static_module for more details.
Sourcepub(crate) fn static_module_instance_handles_mut(
&mut self,
) -> Option<&mut WasiModuleInstanceHandles>
pub(crate) fn static_module_instance_handles_mut( &mut self, ) -> Option<&mut WasiModuleInstanceHandles>
See comments on static_module_instance_handles
.
Sourcepub(crate) fn ensure_static_module(&self) -> Result<(), ()>
pub(crate) fn ensure_static_module(&self) -> Result<(), ()>
Helper function to ensure the module isn’t dynamically linked, needed since we only support a subset of WASIX functionality for dynamically linked modules. Specifically, anything that requires asyncify is not supported right now.
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 linker(&self) -> Option<&Linker>
Trait Implementations§
Source§impl Deref for WasiInstanceGuardMut<'_>
impl Deref for WasiInstanceGuardMut<'_>
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 = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
§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> ⓘ
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> ⓘ
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