pub struct Module {
pub name: String,
/* private fields */
}Expand description
A named collection of functions and values that can be registered
with an Engine and accessed via module::name syntax in Ion scripts.
Fields§
§name: StringImplementations§
Source§impl Module
impl Module
pub fn new(name: impl Into<String>) -> Self
Sourcepub fn register_fn(&mut self, name: &str, func: BuiltinFn)
pub fn register_fn(&mut self, name: &str, func: BuiltinFn)
Register a builtin function in this module.
Sourcepub fn register_submodule(&mut self, sub: Module)
pub fn register_submodule(&mut self, sub: Module)
Register a submodule (e.g., net::http).
Auto Trait Implementations§
impl Freeze for Module
impl !RefUnwindSafe for Module
impl Send for Module
impl Sync for Module
impl Unpin for Module
impl UnsafeUnpin for Module
impl !UnwindSafe for Module
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