pub trait FuncName {
const NAME: &'static str;
const SQLFUNC: Option<SqlFuncSource> = None;
// Provided method
fn sqlfunc_input_types() -> Option<Vec<SqlColumnType>> { ... }
}Expand description
The canonical name of a scalar function, and its source when it is
generated by #[sqlfunc].
For functions generated by #[sqlfunc] the name is that of the underlying
Rust function. Hand-written functions declare it explicitly. Test tooling
refers to exact function variants by these names, via
UnaryFunc::from_variant_name and its binary and variadic counterparts.
Required Associated Constants§
Provided Associated Constants§
Sourceconst SQLFUNC: Option<SqlFuncSource> = None
const SQLFUNC: Option<SqlFuncSource> = None
The #[sqlfunc] declaration this function was generated from, or
None for hand-written functions. Consumed by registry.
Provided Methods§
Sourcefn sqlfunc_input_types() -> Option<Vec<SqlColumnType>>
fn sqlfunc_input_types() -> Option<Vec<SqlColumnType>>
The column types a #[sqlfunc] function naturally consumes, one per
argument, when every parameter type maps to one. None for
hand-written functions and for parameters typed as a bare Datum.
Consumed by registry to probe the output type.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".