pub struct Import {
pub module: StrId,
pub name: StrId,
pub sig: TypeId,
}Expand description
A host function the module calls by index
(Inst::CallImport), bound by the loader by
module and name.
§Examples
use bytecode_lang::{Import, StrId, TypeId};
let print = Import { module: StrId(0), name: StrId(1), sig: TypeId(2) };
assert_eq!(print.sig, TypeId(2));Fields§
§module: StrIdThe providing module’s name (for example ls.io).
name: StrIdThe function’s name within that module.
sig: TypeIdThe function’s signature (a TypeDef::Func entry).
Trait Implementations§
impl Copy for Import
impl Eq for Import
Source§impl Ord for Import
impl Ord for Import
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Import
impl PartialOrd for Import
impl StructuralPartialEq for Import
Auto Trait Implementations§
impl Freeze for Import
impl RefUnwindSafe for Import
impl Send for Import
impl Sync for Import
impl Unpin for Import
impl UnsafeUnpin for Import
impl UnwindSafe for Import
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