pub enum WasmImport<'a> {
Func {
interface: Option<&'a WorldKey>,
func: &'a Function,
},
ResourceIntrinsic {
interface: Option<&'a WorldKey>,
resource: TypeId,
intrinsic: ResourceIntrinsic,
},
FutureIntrinsic {
interface: Option<&'a WorldKey>,
func: &'a Function,
ty: Option<TypeId>,
intrinsic: FutureIntrinsic,
exported: bool,
async_: bool,
},
StreamIntrinsic {
interface: Option<&'a WorldKey>,
func: &'a Function,
ty: Option<TypeId>,
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<TypeId>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<TypeId>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