Enum WasmExport
pub enum WasmExport<'a> {
Func {
interface: Option<&'a WorldKey>,
func: &'a Function,
kind: WasmExportKind,
},
ResourceDtor {
interface: &'a WorldKey,
resource: Id<TypeDef>,
},
Memory,
Initialize,
Realloc,
}Expand description
Different kinds of exports that can be passed to
Resolve::wasm_export_name to export from core wasm modules.
Variants§
Func
A WIT function is being exported, optionally from an interface.
Fields
§
interface: Option<&'a WorldKey>An optional interface which owns func. Use None for top-level
world function.
§
kind: WasmExportKindKind of function (normal, post-return, or callback) being exported.
ResourceDtor
A destructor for a resource exported from this module.
Fields
Memory
Linear memory, the one that the canonical ABI uses.
Initialize
An initialization function (not the core wasm start).
Realloc
The general-purpose realloc hook.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for WasmExport<'a>
impl<'a> RefUnwindSafe for WasmExport<'a>
impl<'a> Send for WasmExport<'a>
impl<'a> Sync for WasmExport<'a>
impl<'a> Unpin for WasmExport<'a>
impl<'a> UnsafeUnpin for WasmExport<'a>
impl<'a> UnwindSafe for WasmExport<'a>
Blanket Implementations§
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