pub enum BuiltinFunction {
Show 187 variants
Abs,
Sqrt,
Ln,
Pow,
Exp,
Log,
Min,
Max,
Floor,
Ceil,
Round,
Sin,
Cos,
Tan,
Asin,
Acos,
Atan,
StdDev,
Range,
Slice,
Push,
Pop,
First,
Last,
Zip,
Filled,
Map,
Filter,
Reduce,
ForEach,
Find,
FindIndex,
Some,
Every,
Print,
Format,
Snapshot,
Exit,
ObjectRest,
ControlFold,
TypeOf,
IsNumber,
IsString,
IsBool,
IsArray,
IsObject,
IsDataRow,
ToString,
ToNumber,
ToBool,
NativePtrSize,
NativePtrNewCell,
NativePtrFreeCell,
NativePtrReadPtr,
NativePtrWritePtr,
NativeTableFromArrowC,
NativeTableFromArrowCTyped,
NativeTableBindType,
FormatValueWithMeta,
FormatValueWithSpec,
FStringContentText,
FStringContentStyledText,
FStringContentFragment,
IntrinsicMinimize,
IntrinsicBspline2_3dBatch,
IntrinsicMean,
IntrinsicMin,
IntrinsicMax,
IntrinsicStd,
IntrinsicVariance,
IntrinsicRandom,
IntrinsicRandomInt,
IntrinsicRandomSeed,
IntrinsicRandomNormal,
IntrinsicRandomArray,
IntrinsicDistUniform,
IntrinsicDistLognormal,
IntrinsicDistExponential,
IntrinsicDistPoisson,
IntrinsicDistSampleN,
IntrinsicBrownianMotion,
IntrinsicGbm,
IntrinsicOuProcess,
IntrinsicRandomWalk,
IntrinsicRollingSum,
IntrinsicRollingMean,
IntrinsicRollingStd,
IntrinsicRollingMin,
IntrinsicRollingMax,
IntrinsicEma,
IntrinsicLinearRecurrence,
IntrinsicShift,
IntrinsicDiff,
IntrinsicPctChange,
IntrinsicFillna,
IntrinsicCumsum,
IntrinsicCumprod,
IntrinsicClip,
IntrinsicCorrelation,
IntrinsicCovariance,
IntrinsicPercentile,
IntrinsicMedian,
IntrinsicAtan2,
IntrinsicSinh,
IntrinsicCosh,
IntrinsicTanh,
IntrinsicCharCode,
IntrinsicFromCharCode,
IntrinsicSeries,
IntrinsicVecAbs,
IntrinsicVecSqrt,
IntrinsicVecLn,
IntrinsicVecExp,
IntrinsicVecAdd,
IntrinsicVecSub,
IntrinsicVecMul,
IntrinsicVecDiv,
IntrinsicVecMax,
IntrinsicVecMin,
IntrinsicVecSelect,
IntrinsicVecAddI64,
IntrinsicMatMulVec,
IntrinsicMatMulMat,
IntrinsicMatAdd,
IntrinsicMatSub,
EvalTimeRef,
EvalDateTimeExpr,
EvalDataDateTimeRef,
EvalDataSet,
EvalDataRelative,
EvalDataRelativeRange,
SomeCtor,
OkCtor,
ErrCtor,
HashMapCtor,
SetCtor,
DequeCtor,
PriorityQueueCtor,
JsonObjectGet,
JsonArrayAt,
JsonObjectKeys,
JsonArrayLen,
JsonObjectLen,
WindowRowNumber,
WindowRank,
WindowDenseRank,
WindowNtile,
WindowLag,
WindowLead,
WindowFirstValue,
WindowLastValue,
WindowNthValue,
WindowSum,
WindowAvg,
WindowMin,
WindowMax,
WindowCount,
JoinExecute,
Reflect,
ContentChart,
ContentTextCtor,
ContentTableCtor,
ContentCodeCtor,
ContentKvCtor,
ContentFragmentCtor,
DateTimeNow,
DateTimeUtc,
DateTimeParse,
DateTimeFromEpoch,
DateTimeFromParts,
DateTimeFromUnixSecs,
MutexCtor,
AtomicCtor,
LazyCtor,
ChannelCtor,
Sign,
Gcd,
Lcm,
Hypot,
Clamp,
IsNaN,
IsFinite,
MatFromFlat,
MakeTableFromRows,
TableBuilderNew,
CodeBuilderNew,
KeyValueBuilderNew,
}Expand description
Built-in functions
Variants§
Abs
Sqrt
Ln
Pow
Exp
Log
Min
Max
Floor
Ceil
Round
Sin
Cos
Tan
Asin
Acos
Atan
StdDev
Range
Slice
Push
Pop
First
Last
Zip
Filled
Map
Filter
Reduce
ForEach
Find
FindIndex
Some
Every
Format
Snapshot
Exit
ObjectRest
ControlFold
TypeOf
IsNumber
IsString
IsBool
IsArray
IsObject
IsDataRow
ToString
ToNumber
ToBool
NativePtrSize
NativePtrNewCell
NativePtrFreeCell
NativePtrReadPtr
NativePtrWritePtr
NativeTableFromArrowC
NativeTableFromArrowCTyped
NativeTableBindType
FormatValueWithMeta
Format a value respecting meta formatting for TypeAnnotatedValues. Used by string interpolation to apply custom formatters.
FormatValueWithSpec
Format a value using a typed interpolation format spec. Used by string interpolation for spec-aware rendering (fixed/table).
FStringContentText
R8 W4 W18.4 (supervisor 2026-05-24 D1 + (a-modified) REVIVE-WITH-
SHARED-MODULE): wrap a stack-top string as a plain (unstyled)
ContentNode::Text for f-string content-lowering. Pops [string],
pushes Ptr(HeapKind::Content). Used for literal segments of a
styled f-string (e.g. the "hello " in f"hello {x:bold,red}").
FStringContentStyledText
R8 W4 W18.4: wrap a stack-top string as a styled ContentNode::Text
with the encoded style. Pops [value_str, fg_kind, fg_payload, bg_kind, bg_payload, flags] (6 args). fg_kind/bg_kind: -1=none,
0=named, 1=rgb. fg_payload/bg_payload: named-color id 0..7 or
(r<<16)|(g<<8)|b. flags: bitmask (bold=1, italic=2, underline=4,
dim=8). Pushes Ptr(HeapKind::Content).
FStringContentFragment
R8 W4 W18.4: combine N stack content values into a
ContentNode::Fragment. Pops N Ptr(HeapKind::Content) slots,
pushes the fragment. The arg-count slot encodes N per the standard
pop_builtin_args ABI.
IntrinsicMinimize
IntrinsicBspline2_3dBatch
IntrinsicMean
IntrinsicMin
IntrinsicMax
IntrinsicStd
IntrinsicVariance
IntrinsicRandom
IntrinsicRandomInt
IntrinsicRandomSeed
IntrinsicRandomNormal
IntrinsicRandomArray
IntrinsicDistUniform
IntrinsicDistLognormal
IntrinsicDistExponential
IntrinsicDistPoisson
IntrinsicDistSampleN
IntrinsicBrownianMotion
IntrinsicGbm
IntrinsicOuProcess
IntrinsicRandomWalk
IntrinsicRollingSum
IntrinsicRollingMean
IntrinsicRollingStd
IntrinsicRollingMin
IntrinsicRollingMax
IntrinsicEma
IntrinsicLinearRecurrence
IntrinsicShift
IntrinsicDiff
IntrinsicPctChange
IntrinsicFillna
IntrinsicCumsum
IntrinsicCumprod
IntrinsicClip
IntrinsicCorrelation
IntrinsicCovariance
IntrinsicPercentile
IntrinsicMedian
IntrinsicAtan2
IntrinsicSinh
IntrinsicCosh
IntrinsicTanh
IntrinsicCharCode
IntrinsicFromCharCode
IntrinsicSeries
IntrinsicVecAbs
IntrinsicVecSqrt
IntrinsicVecLn
IntrinsicVecExp
IntrinsicVecAdd
IntrinsicVecSub
IntrinsicVecMul
IntrinsicVecDiv
IntrinsicVecMax
IntrinsicVecMin
IntrinsicVecSelect
IntrinsicVecAddI64
Vec<int> + Vec<int> — element-wise, overflow-checked (R5.4D).
Mirrors the dynamic-fallback TypedArrayData::I64 + I64 arm:
returns an IntArray and surfaces an overflow error when any
element pair saturates (see simd_vec_add_i64). Wired up here as
scaffolding; compiler emission arrives in R5.4E.
IntrinsicMatMulVec
IntrinsicMatMulMat
IntrinsicMatAdd
Mat<number> + Mat<number> — element-wise (R5.4D). Dispatches to
matrix_kernels::matrix_add after extracting nested-array input
via extract_matrix_f64. Returns a matrix in the nested-array
shape that R5.4B’s Mat<number> literals produce. Unwired from
the compiler side; emission lands in R5.4E.
IntrinsicMatSub
Mat<number> - Mat<number> — element-wise (R5.4D). Companion to
IntrinsicMatAdd, dispatches to matrix_kernels::matrix_sub.
EvalTimeRef
EvalDateTimeExpr
EvalDataDateTimeRef
EvalDataSet
EvalDataRelative
EvalDataRelativeRange
SomeCtor
OkCtor
ErrCtor
HashMapCtor
SetCtor
DequeCtor
PriorityQueueCtor
JsonObjectGet
JsonArrayAt
JsonObjectKeys
JsonArrayLen
JsonObjectLen
WindowRowNumber
WindowRank
WindowDenseRank
WindowNtile
WindowLag
WindowLead
WindowFirstValue
WindowLastValue
WindowNthValue
WindowSum
WindowAvg
WindowMin
WindowMax
WindowCount
JoinExecute
Reflect
ContentChart
Content.chart(type_str) — create a chart ContentNode
ContentTextCtor
Content.text(str) — create a plain text ContentNode
ContentTableCtor
Content.table(headers, rows) — create a table ContentNode
ContentCodeCtor
Content.code(language, source) — create a code block ContentNode
ContentKvCtor
Content.kv(pairs) — create a key-value ContentNode
ContentFragmentCtor
Content.fragment(parts) — create a fragment ContentNode
DateTimeNow
DateTime.now() — current local time as DateTime
DateTimeUtc
DateTime.utc() — current UTC time as DateTime
DateTimeParse
DateTime.parse(str) — parse from string (ISO 8601, RFC 2822, common formats)
DateTimeFromEpoch
DateTime.from_epoch(ms) — from milliseconds since Unix epoch
DateTimeFromParts
DateTime.from_parts(year, month, day, hour?, minute?, second?) — construct from components
DateTimeFromUnixSecs
DateTime.from_unix_secs(secs) — from seconds since Unix epoch
MutexCtor
Mutex(value) — create a new mutex wrapping the given value
AtomicCtor
Atomic(value) — create a new atomic integer with the given initial value
LazyCtor
Lazy(initializer) — create a lazy value with the given initializer closure
ChannelCtor
Channel() — create a new MPSC channel, returns [sender, receiver] array
Sign
sign(x) — returns -1, 0, or 1
Gcd
gcd(a, b) — greatest common divisor
Lcm
lcm(a, b) — least common multiple
Hypot
hypot(a, b) — hypotenuse sqrt(a^2 + b^2)
Clamp
clamp(x, min, max) — clamp value between min and max
IsNaN
isNaN(x) — check if value is NaN
IsFinite
isFinite(x) — check if value is finite
MatFromFlat
mat(rows, cols, …values) — create a Matrix from flat f64 values
MakeTableFromRows
Build a TypedTable from inline row values: args = [schema_id, row_count, field_count, val1, val2, …]
TableBuilderNew
Table::new() — return an empty ContentNode::Table builder seed
CodeBuilderNew
Code::new() — return an empty ContentNode::Code builder seed
KeyValueBuilderNew
KeyValue::new() — return an empty ContentNode::KeyValue builder seed
Implementations§
Source§impl BuiltinFunction
impl BuiltinFunction
Sourcepub fn from_discriminant(id: u16) -> Option<Self>
pub fn from_discriminant(id: u16) -> Option<Self>
Convert a discriminant value back to a BuiltinFunction variant.
Used by the JIT generic builtin trampoline: the translator encodes
the builtin as *builtin as u16 and the FFI function converts it
back at runtime.
Trait Implementations§
Source§impl Clone for BuiltinFunction
impl Clone for BuiltinFunction
impl Copy for BuiltinFunction
Source§impl Debug for BuiltinFunction
impl Debug for BuiltinFunction
Source§impl<'de> Deserialize<'de> for BuiltinFunction
impl<'de> Deserialize<'de> for BuiltinFunction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for BuiltinFunction
Source§impl PartialEq for BuiltinFunction
impl PartialEq for BuiltinFunction
Source§impl Serialize for BuiltinFunction
impl Serialize for BuiltinFunction
impl StructuralPartialEq for BuiltinFunction
Auto Trait Implementations§
impl Freeze for BuiltinFunction
impl RefUnwindSafe for BuiltinFunction
impl Send for BuiltinFunction
impl Sync for BuiltinFunction
impl Unpin for BuiltinFunction
impl UnsafeUnpin for BuiltinFunction
impl UnwindSafe for BuiltinFunction
Blanket Implementations§
impl<T> Allocation for T
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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> ⓘ
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> ⓘ
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