pub enum WasiModuleTreeHandles {
Static(WasiModuleInstanceHandles),
Dynamic {
linker: Linker,
main_module_instance_handles: WasiModuleInstanceHandles,
},
}
Variants§
Static(WasiModuleInstanceHandles)
Dynamic
Implementations§
Source§impl WasiModuleTreeHandles
impl 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 Clone for WasiModuleTreeHandles
impl Clone for WasiModuleTreeHandles
Source§fn clone(&self) -> WasiModuleTreeHandles
fn clone(&self) -> WasiModuleTreeHandles
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for WasiModuleTreeHandles
impl RefUnwindSafe for WasiModuleTreeHandles
impl Send for WasiModuleTreeHandles
impl Sync for WasiModuleTreeHandles
impl Unpin for WasiModuleTreeHandles
impl UnwindSafe for WasiModuleTreeHandles
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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