pub enum FunctionSignature {
Nullary(fn() -> Value),
Unary(fn(&Value) -> Result<Value>),
Binary(fn(&Value, &Value) -> Result<Value>),
Ternary(fn(&Value, &Value, &Value) -> Result<Value>),
Variadic(fn(&[Value]) -> Result<Value>),
UnaryOptional(fn(&Value, Option<&Value>) -> Result<Value>),
Aggregate(fn(&[Value]) -> Result<Value>),
}Expand description
Function signature types
Variants§
Nullary(fn() -> Value)
Function with no arguments
Unary(fn(&Value) -> Result<Value>)
Function with one argument
Binary(fn(&Value, &Value) -> Result<Value>)
Function with two arguments
Ternary(fn(&Value, &Value, &Value) -> Result<Value>)
Function with three arguments
Variadic(fn(&[Value]) -> Result<Value>)
Function with variable arguments
UnaryOptional(fn(&Value, Option<&Value>) -> Result<Value>)
Function with optional second argument
Aggregate(fn(&[Value]) -> Result<Value>)
Aggregate function (operates on multiple values)
Trait Implementations§
Source§impl Clone for FunctionSignature
impl Clone for FunctionSignature
Auto Trait Implementations§
impl Freeze for FunctionSignature
impl RefUnwindSafe for FunctionSignature
impl Send for FunctionSignature
impl Sync for FunctionSignature
impl Unpin for FunctionSignature
impl UnsafeUnpin for FunctionSignature
impl UnwindSafe for FunctionSignature
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more