Struct datafusion_expr::Signature
source · [−]pub struct Signature {
pub type_signature: TypeSignature,
pub volatility: Volatility,
}
Expand description
The Signature of a function defines its supported input types as well as its volatility.
Fields
type_signature: TypeSignature
type_signature - The types that the function accepts. See TypeSignature for more information.
volatility: Volatility
volatility - The volatility of the function. See Volatility for more information.
Implementations
sourceimpl Signature
impl Signature
sourcepub fn new(type_signature: TypeSignature, volatility: Volatility) -> Self
pub fn new(type_signature: TypeSignature, volatility: Volatility) -> Self
new - Creates a new Signature from any type signature and the volatility.
sourcepub fn variadic(common_types: Vec<DataType>, volatility: Volatility) -> Self
pub fn variadic(common_types: Vec<DataType>, volatility: Volatility) -> Self
variadic - Creates a variadic signature that represents an arbitrary number of arguments all from a type in common_types.
sourcepub fn variadic_equal(volatility: Volatility) -> Self
pub fn variadic_equal(volatility: Volatility) -> Self
variadic_equal - Creates a variadic signature that represents an arbitrary number of arguments of the same type.
sourcepub fn uniform(
arg_count: usize,
valid_types: Vec<DataType>,
volatility: Volatility
) -> Self
pub fn uniform(
arg_count: usize,
valid_types: Vec<DataType>,
volatility: Volatility
) -> Self
uniform - Creates a function with a fixed number of arguments of the same type, which must be from valid_types.
sourcepub fn exact(exact_types: Vec<DataType>, volatility: Volatility) -> Self
pub fn exact(exact_types: Vec<DataType>, volatility: Volatility) -> Self
exact - Creates a signature which must match the types in exact_types in order.
sourcepub fn any(arg_count: usize, volatility: Volatility) -> Self
pub fn any(arg_count: usize, volatility: Volatility) -> Self
any - Creates a signature which can a be made of any type but of a specified number
sourcepub fn one_of(
type_signatures: Vec<TypeSignature>,
volatility: Volatility
) -> Self
pub fn one_of(
type_signatures: Vec<TypeSignature>,
volatility: Volatility
) -> Self
one_of Creates a signature which can match any of the TypeSignatures which are passed in.
Trait Implementations
sourceimpl PartialEq<Signature> for Signature
impl PartialEq<Signature> for Signature
impl StructuralPartialEq for Signature
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