pub struct BopModule {
pub path: String,
pub bindings: Vec<(String, Value)>,
pub types: Vec<String>,
}Expand description
Exported surface of a module, as presented through an aliased
use statement. Rc<BopModule> is what a Value::Module
carries so cloning the Value stays cheap.
Fields§
§path: StringThe dotted path the module was loaded from (“std.math”, “game.entity”, …). Useful for error messages.
bindings: Vec<(String, Value)>Exported let / fn / const bindings, in declaration
order. Accessed via m.name field reads.
types: Vec<String>Names of struct / enum types the module declared.
Construction through the namespace (m.Entity { ... })
verifies the type name appears in this list before
falling through to the engine’s type registry.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BopModule
impl !RefUnwindSafe for BopModule
impl !Send for BopModule
impl !Sync for BopModule
impl Unpin for BopModule
impl UnsafeUnpin for BopModule
impl !UnwindSafe for BopModule
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