pub struct BuiltinSignature {
pub params: Vec<Param>,
}Expand description
The parameters a builtin accepts, in positional order.
Fields§
§params: Vec<Param>Implementations§
Source§impl BuiltinSignature
impl BuiltinSignature
Sourcepub fn positional(&self, index: usize) -> Option<&Param>
pub fn positional(&self, index: usize) -> Option<&Param>
The parameter an argument at index binds to; a trailing variadic
parameter takes every argument past it. None means the call passed
more arguments than the builtin accepts.
pub fn named(&self, name: &str) -> Option<&Param>
Sourcepub fn positional_is_lazy(&self, index: usize) -> bool
pub fn positional_is_lazy(&self, index: usize) -> bool
Whether the positional argument at index is passed unevaluated.
Sourcepub fn named_is_lazy(&self, name: &str) -> bool
pub fn named_is_lazy(&self, name: &str) -> bool
Whether the named argument name is passed unevaluated.
Sourcepub fn max_positional(&self) -> Option<usize>
pub fn max_positional(&self) -> Option<usize>
The most positional arguments accepted, or None when variadic.
Trait Implementations§
Source§impl Clone for BuiltinSignature
impl Clone for BuiltinSignature
Source§fn clone(&self) -> BuiltinSignature
fn clone(&self) -> BuiltinSignature
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BuiltinSignature
impl Debug for BuiltinSignature
Source§impl Default for BuiltinSignature
impl Default for BuiltinSignature
Source§fn default() -> BuiltinSignature
fn default() -> BuiltinSignature
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BuiltinSignature
impl RefUnwindSafe for BuiltinSignature
impl Send for BuiltinSignature
impl Sync for BuiltinSignature
impl Unpin for BuiltinSignature
impl UnsafeUnpin for BuiltinSignature
impl UnwindSafe for BuiltinSignature
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