pub struct ModuleFn {
pub name: &'static str,
pub arity: usize,
pub optional: bool,
pub runtime_fn: &'static str,
pub hint: &'static str,
}Expand description
One callable member of a module: its arity, the runtime function a call emits,
and the call-shape hint shown in arity diagnostics. arity is the required
positional-argument count; optional == true allows exactly one extra trailing
argument, so the accepted range is arity..=arity + 1 (an omitted trailing
argument reaches the runtime function as Value::None).
Fields§
§name: &'static str§arity: usize§optional: bool§runtime_fn: &'static str§hint: &'static strImplementations§
Auto Trait Implementations§
impl Freeze for ModuleFn
impl RefUnwindSafe for ModuleFn
impl Send for ModuleFn
impl Sync for ModuleFn
impl Unpin for ModuleFn
impl UnsafeUnpin for ModuleFn
impl UnwindSafe for ModuleFn
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