Enum WasmImport
pub enum WasmImport<'a> {
Func {
interface: Option<&'a WorldKey>,
func: &'a Function,
},
ResourceIntrinsic {
interface: Option<&'a WorldKey>,
resource: Id<TypeDef>,
intrinsic: ResourceIntrinsic,
},
FutureIntrinsic {
interface: Option<&'a WorldKey>,
func: &'a Function,
ty: Option<Id<TypeDef>>,
intrinsic: FutureIntrinsic,
exported: bool,
async_: bool,
},
StreamIntrinsic {
interface: Option<&'a WorldKey>,
func: &'a Function,
ty: Option<Id<TypeDef>>,
intrinsic: StreamIntrinsic,
exported: bool,
async_: bool,
},
}Expand description
Possible imports that can be passed to Resolve::wasm_import_name.
Variants§
Func
A WIT function is being imported. Optionally from an interface.
Fields
ResourceIntrinsic
A resource-related intrinsic is being imported.
Fields
§
intrinsic: ResourceIntrinsicThe intrinsic that’s being imported.
FutureIntrinsic
A future-related intrinsic is being imported.
Fields
§
ty: Option<Id<TypeDef>>The future type appearing in func.find_futures_and_streams(resolve).
Use None for the special unit payload case.
§
intrinsic: FutureIntrinsicThe intrinsic that’s being imported.
StreamIntrinsic
A stream-related intrinsic is being imported.
Fields
§
ty: Option<Id<TypeDef>>The stream type appearing in func.find_futures_and_streams(resolve).
Use None for the special unit payload case.
§
intrinsic: StreamIntrinsicThe intrinsic that’s being imported.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for WasmImport<'a>
impl<'a> RefUnwindSafe for WasmImport<'a>
impl<'a> Send for WasmImport<'a>
impl<'a> Sync for WasmImport<'a>
impl<'a> Unpin for WasmImport<'a>
impl<'a> UnsafeUnpin for WasmImport<'a>
impl<'a> UnwindSafe for WasmImport<'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