pub struct ExternRegistry { /* private fields */ }Expand description
Aggregates Lust type declarations that originate from Rust.
Implementations§
Source§impl ExternRegistry
impl ExternRegistry
pub fn new() -> Self
pub fn add_struct(&mut self, def: StructDef) -> &mut Self
pub fn add_enum(&mut self, def: EnumDef) -> &mut Self
pub fn add_trait(&mut self, def: TraitDef) -> &mut Self
pub fn add_impl(&mut self, impl_block: ImplBlock) -> &mut Self
pub fn add_function(&mut self, func: FunctionDef) -> &mut Self
pub fn add_const(&mut self, name: impl Into<String>, ty: Type) -> &mut Self
pub fn extend(&mut self, other: &ExternRegistry)
pub fn register_with_typechecker(&self, checker: &mut TypeChecker) -> Result<()>
pub fn register_with_vm(&self, vm: &mut VM)
pub fn register_struct_layouts(&self, vm: &mut VM)
pub fn register_type_stubs(&self, vm: &mut VM)
pub fn module_stubs(&self) -> Vec<ModuleStub>
pub fn structs(&self) -> impl Iterator<Item = &StructDef>
pub fn enums(&self) -> impl Iterator<Item = &EnumDef>
Trait Implementations§
Source§impl Clone for ExternRegistry
impl Clone for ExternRegistry
Source§fn clone(&self) -> ExternRegistry
fn clone(&self) -> ExternRegistry
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for ExternRegistry
impl Default for ExternRegistry
Source§fn default() -> ExternRegistry
fn default() -> ExternRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExternRegistry
impl RefUnwindSafe for ExternRegistry
impl Send for ExternRegistry
impl Sync for ExternRegistry
impl Unpin for ExternRegistry
impl UnsafeUnpin for ExternRegistry
impl UnwindSafe for ExternRegistry
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