pub struct FunctionArity { /* private fields */ }Expand description
Immutable SQL-visible argument-count contract for a registered function.
Construct this once from user metadata and publish it alongside the function object. Runtime lookup uses only this value, never re-entering user-defined metadata callbacks.
Implementations§
Source§impl FunctionArity
impl FunctionArity
Sourcepub fn variadic(min_args: i32, max_args: Option<i32>) -> Self
pub fn variadic(min_args: i32, max_args: Option<i32>) -> Self
Construct a variadic contract with inclusive argument-count bounds.
Sourcepub const fn declared_args(self) -> i32
pub const fn declared_args(self) -> i32
Registry key arity (-1 for a variadic contract).
Trait Implementations§
Source§impl Clone for FunctionArity
impl Clone for FunctionArity
Source§fn clone(&self) -> FunctionArity
fn clone(&self) -> FunctionArity
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 moreimpl Copy for FunctionArity
Source§impl Debug for FunctionArity
impl Debug for FunctionArity
impl Eq for FunctionArity
Source§impl Hash for FunctionArity
impl Hash for FunctionArity
Source§impl Ord for FunctionArity
impl Ord for FunctionArity
Source§fn cmp(&self, other: &FunctionArity) -> Ordering
fn cmp(&self, other: &FunctionArity) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for FunctionArity
impl PartialEq for FunctionArity
Source§impl PartialOrd for FunctionArity
impl PartialOrd for FunctionArity
impl StructuralPartialEq for FunctionArity
Auto Trait Implementations§
impl Freeze for FunctionArity
impl RefUnwindSafe for FunctionArity
impl Send for FunctionArity
impl Sync for FunctionArity
impl Unpin for FunctionArity
impl UnsafeUnpin for FunctionArity
impl UnwindSafe for FunctionArity
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