pub struct Signature { /* private fields */ }
Implementations
sourceimpl Signature
impl Signature
pub fn new(
name: Option<impl Into<StringSymbol>>,
required: Vec<Parameter>,
default: Vec<Parameter>,
variadic: Option<Parameter>
) -> Self
pub fn name(&self) -> Option<StringSymbol>
pub fn display_short(&self) -> impl Display + '_
pub fn required(&self) -> &[Parameter]
pub fn default(&self) -> &[Parameter]
pub fn variadic(&self) -> Option<&Parameter>
pub fn min_arity(&self) -> usize
pub fn max_arity(&self) -> Option<usize>
pub fn check_args(&self, args: &[Variant]) -> ExecResult<()>
sourcepub fn bind_args<'a>(
&self,
args: &'a [Variant],
defaults: &'a [Variant],
argbuf: &'a mut [Variant]
) -> BoundArgs<'a>
pub fn bind_args<'a>(
&self,
args: &'a [Variant],
defaults: &'a [Variant],
argbuf: &'a mut [Variant]
) -> BoundArgs<'a>
Helper for native functions. Prepares a complete argument buffer by cloning argument values, while handling default and variadic arguments. Assumes check_args() has already succeeded.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Signature
impl !Send for Signature
impl !Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more