pub struct FnDescriptor {
pub namespace: &'static str,
pub name: &'static str,
pub params: Vec<Param>,
pub return_type: PylonType,
pub impl_strategy: ImplStrategy,
pub cast_target: bool,
pub volatility: FnVolatility,
}Expand description
One overload of a stdlib function.
Fields§
§namespace: &'static strPyQL namespace: "std", "math", or "cal".
name: &'static strUnqualified function name, e.g. "count", "str_lower".
params: Vec<Param>Ordered parameter list for this overload.
return_type: PylonTypeReturn type for this overload.
impl_strategy: ImplStrategyHow the transpiler should emit this call.
cast_target: boolTrue when this overload backs a Function-strategy type cast entry.
volatility: FnVolatilityCall-result stability, independent of impl_strategy — a
SqlBuiltin like uuidv7() is volatile even though it installs no
PylonFnDef of its own. Consumers gate on this: a pointer default
wants volatile, a filter predicate almost never does.
Implementations§
Source§impl FnDescriptor
impl FnDescriptor
Sourcepub fn is_aggregate(&self) -> bool
pub fn is_aggregate(&self) -> bool
True when any parameter is set-typed — i.e. this overload is an aggregate and only makes sense over a multilink path or a subquery, never over a single scalar pointer.
Sourcepub fn returns_set(&self) -> bool
pub fn returns_set(&self) -> bool
True when the call yields a set rather than a single value
(std::array_unpack) — meaningless inside a filter predicate.
Sourcepub fn is_intrinsic(&self) -> bool
pub fn is_intrinsic(&self) -> bool
True for TranspilerIntrinsic overloads, which need compile-time type
context and so can’t be validated by arity alone.
Sourcepub fn is_variadic(&self) -> bool
pub fn is_variadic(&self) -> bool
True when the overload accepts a trailing variadic parameter, so any
argument count at or above params.len() - 1 is legal.
Trailing among the positional parameters: json_set(target, path..., value := …) declares named-only ones after the variadic, and they are
passed by name rather than counted against it.
Sourcepub fn variadic_index(&self) -> Option<usize>
pub fn variadic_index(&self) -> Option<usize>
Index of the variadic parameter, when one is declared.
Sourcepub fn named_count(&self) -> usize
pub fn named_count(&self) -> usize
Count of parameters a call passes by name rather than by position.
Trait Implementations§
Source§impl Clone for FnDescriptor
impl Clone for FnDescriptor
Auto Trait Implementations§
impl Freeze for FnDescriptor
impl RefUnwindSafe for FnDescriptor
impl Send for FnDescriptor
impl Sync for FnDescriptor
impl Unpin for FnDescriptor
impl UnsafeUnpin for FnDescriptor
impl UnwindSafe for FnDescriptor
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.