Skip to main content

Builtin

Enum Builtin 

Source
pub enum Builtin {
Show 232 variants Str, Num, Abs, Flr, Cel, Rou, Min, Max, Mod, Fmod, Clamp, Pow, Sqrt, Log, Exp, Sin, Cos, Tan, Log10, Log2, Asin, Acos, Atan, Atan2, Sum, Prod, Cumsum, Cprod, Ewm, Avg, Median, Quantile, Stdev, Variance, Fft, Ifft, Transpose, Matmul, Dot, Matvec, Len, Hd, At, Tl, Rev, Srt, Rsrt, Slc, Lst, Take, Drop, Unq, Flat, Has, Spl, Cat, Zip, Enumerate, Range, Linspace, Ones, Rep, Window, Chunks, Setunion, Setinter, Setdiff, Map, Flt, Fld, Ct, Grp, Uniqby, Partition, Frq, Flatmap, Mapr, Rnd, Rndn, RandBytes, Seed, Now, NowMs, Dtfmt, Dtparse, DtparseRel, Sleep, TzOffset, Rd, RdJson, Rdl, Rdb, Rdin, Rdinl, ForLine, Wr, Wra, Wro, Wrl, Prnt, Env, WorldCap, WorldNoNet, Ls, Walk, Glob, Fsize, Mtime, Isfile, Isdir, EnvAll, Trm, Upr, Lwr, Cap, Padl, Padr, Ord, Chr, Chars, Fmt, Fmt2, Rgx, Rgxall, Rgxall1, Rgxsub, RgxallMulti, Jpth, Jkeys, Jdmp, Jpar, JparList, Rdjl, Get, Post, GetMany, GetTo, PstTo, Getx, Pstx, Put, Pat, Del, Hed, Opt, GetStream, GetStreamH, PostStream, PostStreamH, Run, Run2, RunBg, Mmap, Mget, Mset, Mhas, Mkeys, Mvals, Mdel, MgetOr, LgetOr, Mpairs, Solve, Inv, Det, Lstsq, Argmax, Argmin, Argsort, Bisect, ParMap, Dirname, Basename, Pathjoin, Pi, Tau, Eu, DurParse, DurFmt, DefaultOnErr, Urlenc, Urldec, B64u, B64uDec, Sha256, HmacSha256, B64, B64Dec, HexEnc, CtEq, Sha256Hex, Sha256d, Tokcount, Where, AddMo, LastDom, NextBusinessDay, DayOfWeek, Rsum, Ravg, Rmin, Idxof, HexRev, Band, Bor, Bxor, Bnot, Bshl, Bshr, Brot, Band64, Bor64, Bxor64, Bnot64, Bshl64, Bshr64, Brot64, Arange, Zeros, Vstack, Hstack, ColumnStack, Hist, Convolve, Searchsorted, Cabs, Cmul, Pairwise, Pdist2, RunFullEnv, Run2FullEnv, Spawn,
}
Expand description

Enum of all builtin functions in ilo.

Resolving a function name to a Builtin variant should happen at compile time (in the bytecode compiler) or once at the start of interpretation, so that hot dispatch paths use integer-discriminant matching rather than string comparisons.

Variants§

§

Str

§

Num

§

Abs

§

Flr

§

Cel

§

Rou

§

Min

§

Max

§

Mod

§

Fmod

§

Clamp

§

Pow

§

Sqrt

§

Log

§

Exp

§

Sin

§

Cos

§

Tan

§

Log10

§

Log2

§

Asin

§

Acos

§

Atan

§

Atan2

§

Sum

§

Prod

§

Cumsum

§

Cprod

§

Ewm

§

Avg

§

Median

§

Quantile

§

Stdev

§

Variance

§

Fft

§

Ifft

§

Transpose

§

Matmul

§

Dot

§

Matvec

§

Len

§

Hd

§

At

§

Tl

§

Rev

§

Srt

§

Rsrt

§

Slc

§

Lst

§

Take

§

Drop

§

Unq

§

Flat

§

Has

§

Spl

§

Cat

§

Zip

§

Enumerate

§

Range

§

Linspace

§

Ones

§

Rep

§

Window

§

Chunks

§

Setunion

§

Setinter

§

Setdiff

§

Map

§

Flt

§

Fld

§

Ct

§

Grp

§

Uniqby

§

Partition

§

Frq

§

Flatmap

§

Mapr

§

Rnd

§

Rndn

§

RandBytes

§

Seed

§

Now

§

NowMs

§

Dtfmt

§

Dtparse

§

DtparseRel

§

Sleep

§

TzOffset

§

Rd

§

RdJson

§

Rdl

§

Rdb

§

Rdin

§

Rdinl

§

ForLine

§

Wr

§

Wra

§

Wro

§

Wrl

§

Prnt

§

Env

§

WorldCap

world > World — return the current capability World value. Zero args; reads from the runtime’s active Caps.

§

WorldNoNet

world-no-net > World — construct a World with net=false. All other caps (read, write, run) are inherited from the runtime Caps. Used to pass a restricted capability token to a sub-function that should not perform network I/O; the verifier enforces this statically (ILO-T044).

§

Ls

§

Walk

§

Glob

§

Fsize

§

Mtime

§

Isfile

§

Isdir

§

EnvAll

§

Trm

§

Upr

§

Lwr

§

Cap

§

Padl

§

Padr

§

Ord

§

Chr

§

Chars

§

Fmt

§

Fmt2

§

Rgx

§

Rgxall

§

Rgxall1

§

Rgxsub

§

RgxallMulti

§

Jpth

§

Jkeys

§

Jdmp

§

Jpar

§

JparList

§

Rdjl

§

Get

§

Post

§

GetMany

§

GetTo

§

PstTo

§

Getx

§

Pstx

§

Put

§

Pat

§

Del

§

Hed

§

Opt

§

GetStream

§

GetStreamH

§

PostStream

§

PostStreamH

§

Run

§

Run2

§

RunBg

§

Mmap

§

Mget

§

Mset

§

Mhas

§

Mkeys

§

Mvals

§

Mdel

§

MgetOr

§

LgetOr

§

Mpairs

§

Solve

§

Inv

§

Det

§

Lstsq

§

Argmax

§

Argmin

§

Argsort

§

Bisect

§

ParMap

§

Dirname

§

Basename

§

Pathjoin

§

Pi

§

Tau

§

Eu

§

DurParse

§

DurFmt

§

DefaultOnErr

§

Urlenc

§

Urldec

§

B64u

§

B64uDec

§

Sha256

§

HmacSha256

§

B64

§

B64Dec

§

HexEnc

§

CtEq

§

Sha256Hex

§

Sha256d

§

Tokcount

§

Where

§

AddMo

§

LastDom

§

NextBusinessDay

§

DayOfWeek

§

Rsum

§

Ravg

§

Rmin

§

Idxof

§

HexRev

§

Band

§

Bor

§

Bxor

§

Bnot

§

Bshl

§

Bshr

§

Brot

§

Band64

§

Bor64

§

Bxor64

§

Bnot64

§

Bshl64

§

Bshr64

§

Brot64

§

Arange

§

Zeros

§

Vstack

§

Hstack

§

ColumnStack

§

Hist

§

Convolve

§

Searchsorted

§

Cabs

§

Cmul

§

Pairwise

§

Pdist2

§

RunFullEnv

§

Run2FullEnv

§

Spawn

Implementations§

Source§

impl Builtin

Source

pub const ALL: &'static [Builtin]

Stable list of every Builtin variant, in canonical order.

The position of each variant in this slice is its on-wire tag for OP_CALL_BUILTIN_TREE. Stability matters: appending is fine, reordering or removing entries breaks any persisted bytecode.

Source

pub fn from_name(s: &str) -> Option<Builtin>

Resolve a canonical builtin name to its enum variant. Returns None for user-defined functions.

Source

pub fn name(self) -> &'static str

Return the canonical short name for this builtin.

Source

pub fn is_builtin(name: &str) -> bool

Check if a name refers to a builtin function.

Source

pub fn stability(self) -> &'static str

Stability tier for this builtin, sourced from STABILITY.md.

  • "experimental" — unreleased (above 0.12.1 in CHANGELOG.md). May be removed or changed without notice.
  • "provisional" — shipped in a released version (0.12.1 or earlier). Signature may change pre-1.0; canonical short name is stable-ish.

Used by ilo spec --json ai to emit per-item stability annotations.

Source

pub fn tag(self) -> u8

On-wire 8-bit tag for cross-engine builtin dispatch. See ALL.

Source

pub fn from_tag(tag: u8) -> Option<Builtin>

Inverse of tag. Returns None for unknown tags so the VM/JIT can surface a clean runtime error rather than panicking on a malformed instruction.

Trait Implementations§

Source§

impl Clone for Builtin

Source§

fn clone(&self) -> Builtin

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Builtin

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for Builtin

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Builtin

Source§

fn eq(&self, other: &Builtin) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for Builtin

Source§

impl Eq for Builtin

Source§

impl StructuralPartialEq for Builtin

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.