Struct datafusion_expr::Signature
source · pub struct Signature {
pub type_signature: TypeSignature,
pub volatility: Volatility,
}
Expand description
The signature of a function defines the supported argument types and 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§
source§impl 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 variadic_any(volatility: Volatility) -> Self
pub fn variadic_any(volatility: Volatility) -> Self
variadic_any - Creates a variadic signature that represents an arbitrary number of arguments of any 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§
source§impl PartialEq<Signature> for Signature
impl PartialEq<Signature> for Signature
impl Eq for Signature
impl StructuralEq 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§
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.