pub struct Module {
pub name: &'static str,
pub funcs: &'static [ModuleFn],
pub consts: &'static [(&'static str, &'static str)],
}Expand description
One importable module: its name, its function members, and its constant members (each a name paired with the Rust expression codegen emits inline).
Fields§
§name: &'static str§funcs: &'static [ModuleFn]§consts: &'static [(&'static str, &'static str)]Implementations§
Source§impl Module
impl Module
Sourcepub fn func(&self, name: &str) -> Option<&'static ModuleFn>
pub fn func(&self, name: &str) -> Option<&'static ModuleFn>
The function member name, if this module has one.
Sourcepub fn const_expr(&self, name: &str) -> Option<&'static str>
pub fn const_expr(&self, name: &str) -> Option<&'static str>
The Rust expression for the constant member name, if this module has one.
Sourcepub fn members(&self) -> String
pub fn members(&self) -> String
Every member name, comma-joined, for the “unknown member” hint.
Sourcepub fn first_member(&self) -> &'static str
pub fn first_member(&self) -> &'static str
The first member name, for hints that show one example call/value.
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