Skip to main content

BuiltinId

Enum BuiltinId 

Source
pub enum BuiltinId {
Show 270 variants Length, Contains, Format, ParseInt, ParseFloat, Chr, Abs, Sqrt, Min, Max, Floor, Ceil, Round, Pow, Decimal, Complex, Conjugate, RealPart, ImagPart, Modular, Quantity, Money, SetRate, ToCurrency, SetRates, Uuid, UuidNil, UuidMax, UuidVersion, UuidDns, UuidUrl, UuidOid, UuidX500, TextBytes, TextFromBytes, WireBytes, CompressBytes, DecompressBytes, SealBytes, OpenBytes, FromWireBytes, SealFrame, OpenFrame, ReadWireProgram, WriteWireResidual, UuidBytes, UuidFromBytes, Convert, ParseTimestamp, FormatTimestamp, YearOf, MonthOf, DayOf, WeekdayOf, HourOf, MinuteOf, SecondOf, WeekOf, QuarterOf, DateOf, TimeOf, MakeDate, MakeMoment, LocalInstant, SecondsBetween, MonthsBetween, YearsBetween, AddSeconds, InZone, Copy, CountOnes, LeadingZeros, TrailingZeros, RunAccepted, Word32, Word64, Rotl, Rotr, Wand, Wor, Wnot, Lanes4Word32Make, Lanes4Of, SeqOfLanes4W32, Sha1Rnds4, Sha1Msg1, Sha1Msg2, Sha1Nexte, Lanes16Word8Make, SeqOfLanes16W8, Splat16Word8, Shuffle16, ShrBytes16, InterleaveLo16, InterleaveHi16, ByteAdd16, Maddubs16, Packus16, Lanes8Word32, SeqOfLanes8, Splat8Word32, IntOfWord32, IntOfWord64, Word64Shl, Word64Shr, Word64And, Word32Shr, Word16Make, IntOfWord16, Lanes4Word64, SeqOfLanes4, Mul32x32To64, HsumLanes4, Splat4Word64, AndNot4, Lanes16Word16, SeqOfLanes16, Splat16Word16, Mulhi16, Montmul32, NttBcastLo, NttBcastHi, NttBlend, MapOf, SetOf, RepeatSeq, ReedSolomonEncode, ReedSolomonRecover, FecProtect, FecRestore, DomBody, DomCreateElement, DomCreateTextNode, DomSetText, DomSetHtml, DomClearChildren, DomOnMessage, DomMoveChildren, DomBeginPaint, DomSetAttribute, DomAppendChild, DomGetText, DomGetValue, DomSetValue, DomApplyPatches, DomSetChecked, DomPreventDefault, StorageSet, StorageGet, StorageGetOr, StorageRemove, DomSetStream, RtcPeerConnection, RtcDataChannel, RtcCreateOffer, RtcCreateAnswer, RtcSetLocal, RtcSetRemote, RtcAddIce, RtcSend, DomQuerySelector, DomAddEventListener, DomEventValue, DomEventKey, TryReadBytes, DomEventTarget, DomFetchText, DomResponseText, ReadBytes, SignalNew, SignalSet, SignalGetInt, SignalGetText, SignalBeginRender, SignalNewText, SignalSetText, SignalEnterComponent, SignalExitComponent, SignalNewSeq, SignalGetSeq, SignalSetSeq, SignalNewFloat, SignalGetFloat, SignalSetFloat, FileRead, FileWrite, RandomInt, RandomFloat, DomFetchSend, DomResponseStatus, DomResponseBody, DomResponseHeader, DomResponseError, DomFetchAbort, DomFetchSetTimeout, DomRoutePath, DomRouteQuery, DomNavigate, DomReplaceRoute, DomSetTitle, DomClipboardWrite, DomDownloadFile, DomNotify, DomPublish, DomElementCommand, DomEventFileName, DomSetInterval, DomScrollGap, DomOnWindowEvent, DomGetAttribute, DomGoBack, DomReload, DomOnRoute, Fail, FailReason, Word8Make, IntOfWord8, NativeKernel, NoteTurn, DomSetHeadHtml, InspectUnhandledDynamic, DomEventFileSize, DomEventFileType, DomEventFileBytes, DomListenFlags, DomAssignLocation, DomJournalDetail, DomApplyWords, DomWakeAfter, DomEnterValue, DomDispatchEntry, VfsReadFile, VfsWriteFile, VfsMount, EnvGet, TimeNow, EnvHas, EnvValue, Infinitesimal, StandardPart, IsInfinitesimal, IsLimited, InfinitelyClose, GeneratorOf, LimitOf, Provisional, AtTheLimit, EveryNatural, TripCount, AffinePower, CycleAt, SearchCandidates, StateSize, PolynomialFlow, ExactSqrt, ExactExp, ExactLn, ExactPi, ExactE, ExactOmega, HybridFlow, FirstExit, DefinedReal, ExactPower, OrderedInfinitesimal, SealBox, OpenBox, SealValueBox, OpenValueBox, ReadReals,
}

Variants§

§

Length

§

Contains

contains(haystack, needle) — true iff needle is a substring of haystack (both Text). The empty needle is contained in everything.

§

Format

§

ParseInt

§

ParseFloat

§

Chr

§

Abs

§

Sqrt

§

Min

§

Max

§

Floor

§

Ceil

§

Round

§

Pow

§

Decimal

decimal(text) / decimal(int) — construct an exact base-10 fixed-point (money) from its literal text (decimal("19.99")) or an integer. The non-breaking entry into the Decimal tower (it does NOT change how 19.99 literals parse).

§

Complex

complex(re, im) — an exact complex from two exact reals, or a floating-point complex (ComplexF) if either part is a Float. complex(0, 1) is the imaginary unit i; complex(0,1) * complex(0,1) = −1.

§

Conjugate

conjugate(z) — the complex conjugate re − im·i (exact Complex stays exact, ComplexF stays float; a real number is its own conjugate). The primitive for Hermitian transpose and the conjugated dot product xᴴy in complex BLAS/LAPACK.

§

RealPart

re(z) — the real part of a complex number as a Float (a real number → itself as a Float).

§

ImagPart

im(z) — the imaginary part of a complex number as a Float (a real number → 0.0).

§

Modular

modular(value, modulus) — construct an element of ℤ/nℤ (the value reduced mod n).

§

Quantity

quantity(value, "unit") — construct a dimensioned physical quantity (quantity(2, "inch")). The magnitude rides the exact rational tower; the unit name resolves through the catalog.

§

Money

money(amount, "USD") — construct an exact monetary amount, quantised to the currency’s minor unit. The amount rides the Decimal tower (never float-drifts); the code resolves through the ISO-4217 catalog.

§

SetRate

set_rate("EUR", 1.10) — install/replace one exchange rate (vs the reference) in the ambient rate context that <money> in <currency> reads. A side effect; returns nothing.

§

ToCurrency

to_currency(money, "EUR") — convert money to another currency via the ambient rate context (exact). Errors if no rates are in scope or the currency is unknown. Surface: <money> in EUR.

§

SetRates

set_rates(map) — bulk-install a whole exchange-rate table from a Map of Text to <number> (code → rate vs the reference) into the ambient rate context. The bridge a literal, network-synced, or fetched rate table feeds. A side effect; returns nothing.

§

Uuid

uuid("550e8400-…") — parse a UUID from text (canonical/simple/braced/urn); error on a bad id.

§

UuidNil

uuid_nil() / uuid_max() — the two special ids.

§

UuidMax

§

UuidVersion

uuid_version(u) — the version nibble (0 nil, 1–8, 15 max).

§

UuidDns

The well-known namespace ids: uuid_dns(), uuid_url(), uuid_oid(), uuid_x500().

§

UuidUrl

§

UuidOid

§

UuidX500

§

TextBytes

Byte-level primitives that let the UUID version constructors be written IN LOGOS (uuid.lg): text_bytes is a Text’s UTF-8 bytes; uuid_bytes/uuid_from_bytes convert a Uuid to/from its 16 bytes. (md5/sha1/uuid_v3/uuid_v5 are Logos stdlib functions now, not builtins.)

§

TextFromBytes

text_from_bytes(seq) — the exact inverse of text_bytes: rebuild a Text from its UTF-8 Seq of Int. The wire medium for the Core-IR codec (Seq of Int) carries Text this way.

§

WireBytes

wireBytes(value) — the value’s plain wire form (peer codec encode_value_raw) as a Seq of Int. Lets the host serialize a program AST for a compile-once native PE, byte- identical to what the native binary’s generated wire_decode reads.

§

CompressBytes

compressBytes(seq) — squeeze a Seq of Int byte payload with the SMALLEST of the codec’s built-in compressors (deflate/lz4/zstd, self-describing tag byte); stores raw when nothing shrinks it, so it never grows by more than one byte. The streaming knob for redundant state (CRDT deltas, rosters, keypoints) — run it BEFORE encrypt, since ciphertext is incompressible, and never on a payload that carries a secret beside anything an attacker chooses: the compressed length then gives the secret away a guess at a time (CRIME, BREACH).

§

DecompressBytes

decompressBytes(seq) — the exact inverse of compressBytes: read the codec tag and inflate (with the decompression-bomb bound). Errors on a malformed frame.

§

SealBytes

sealBytes(key, nonce, plaintext) — the secure streaming frame: ChaCha20-Poly1305 authenticated-encrypt the plaintext (32-byte key, 12-byte nonce, both Seq of Int), which is never compressed first — a frame’s length tells nothing of its plaintext but its length. The 16-byte Poly1305 tag makes the frame tamper-evident. The caller keeps every nonce under a key distinct; sealBox draws one instead. Inverse: openBytes.

§

OpenBytes

openBytes(key, nonce, sealed) — verify the Poly1305 tag (constant-time) and decrypt, returning the plaintext. ERRORS on a wrong key, a tampered frame, or truncation — it never yields unauthenticated bytes.

§

FromWireBytes

fromWireBytes(seq) — the inverse of wireBytes: decode a self-describing wire byte Seq of Int back into the value it encoded (Int/Text/Bool/Seq/Set/Map/Struct/Tuple/…, no schema needed). Errors on a malformed or trailing-byte frame. Completes the round trip a receiver needs.

§

SealFrame

sealFrame(key, nonce, value) — the one-call secure streaming frame for a VALUE: wire-encode, then ChaCha20-Poly1305 authenticated-encrypt. openFrame reverses it straight back to the value. Fuses wireBytes+sealBytes with no intermediate Seq; sealValueBox draws its nonce instead.

§

OpenFrame

openFrame(key, nonce, sealed) — verify, decrypt, and wire-decode a sealFrame back into the original value. Errors on tamper / wrong key / malformed frame.

§

ReadWireProgram

readWireProgram() — read ONE length-framed CProgram from stdin (u32 LE length, then that many wire bytes, decoded via the generated wire_decode) and return it; on EOF the process exits cleanly (the resident-server loop terminator). AOT-only (returns the generated CProgram); the interpreter variant rebuilds a RuntimeValue for parity.

§

WriteWireResidual

writeWireResidual(text) — write text back as a length-framed residual (u32 LE length, then the UTF-8 bytes) to stdout and flush, returning the byte count. The response half of the resident PE server’s request/response protocol.

§

UuidBytes

§

UuidFromBytes

§

Convert

convert(quantity, "unit") — re-express a quantity in another unit of the SAME dimension (convert(q, "foot")); a different dimension is a clean error (the forbidden cast).

§

ParseTimestamp

parse_timestamp("2024-03-10T07:30:00Z") — parse an RFC 3339 / ISO 8601 timestamp into a Moment (nanoseconds since the epoch). The wire-first “the timestamp is its own type” entry.

§

FormatTimestamp

format_timestamp(moment) — render a Moment as an RFC 3339 / ISO 8601 UTC string.

§

YearOf

Calendar component extractors on a Moment (UTC), each returning an Int: year_of / month_of (1–12) / day_of (1–31) / weekday_of (ISO 8601: 1 = Monday … 7 = Sunday).

§

MonthOf

§

DayOf

§

WeekdayOf

§

HourOf

§

MinuteOf

§

SecondOf

§

WeekOf

week_of(moment) — the ISO-8601 week number (1..=53) of the Moment/Date (UTC).

§

QuarterOf

quarter_of(moment) — the calendar quarter (1..=4) of the Moment/Date (UTC).

§

DateOf

date_of(moment) — the calendar day (a Date) the Moment falls on (UTC); identity on a Date.

§

TimeOf

time_of(moment) — the wall-clock time-of-day (a Time) of the Moment (UTC).

§

MakeDate

makeDate(year, month, day) — construct a Date from civil components via base days_from_civil.

§

MakeMoment

makeMoment(year, month, day, hour, minute, second) — construct a UTC Moment from civil components. Defined to agree with calendar.timegm to the second (same days_from_civil core).

§

LocalInstant

local_instant(moment, "zone") — the local-as-UTC instant in a named zone (the lowering target for the <comp> of <m> in "<zone>", so every extractor reads the LOCAL component).

§

SecondsBetween

seconds_between(a, b) — whole seconds from Moment a to Moment b (signed Int).

§

MonthsBetween

months_between(a, b) / years_between(a, b) — complete calendar months/years (signed Int).

§

YearsBetween

§

AddSeconds

add_seconds(moment, n) — the Moment n seconds after moment.

§

InZone

in_zone(moment, "America/New_York") — the local wall-clock time (with offset) of a Moment in a named IANA zone, as Text. The natural surface is <moment> in "<zone>".

§

Copy

§

CountOnes

§

LeadingZeros

leading_zeros(x) — count of high zero bits in the Int’s u64 pattern ((x as u64).leading_zeros(); 64 for x = 0). Backs bitLength.

§

TrailingZeros

trailing_zeros(x) — count of low zero bits in the Int’s u64 pattern ((x as u64).trailing_zeros(); 64 for x = 0). Backs trailingZeros.

§

RunAccepted

§

Word32

word32(n) / word64(n) — construct a fixed-width wrapping integer from an Int.

§

Word64

§

Rotl

rotl(w, n) / rotr(w, n) — rotate a word left/right by n bits.

§

Rotr

§

Wand

word_and(a, b) / word_or(a, b) / word_not(a) — bitwise ops on the Word ring, CONSISTENT across every tier (the and/or keywords are logical short-circuit on the VM, so word crypto written in Logos — MD5/SHA-1 round functions — uses these instead).

§

Wor

§

Wnot

§

Lanes4Word32Make

The SHA-1 SHA-NI lane vocabulary: lanes4Word32(s)/seqOfLanes4W32(v) pack/unpack a Lanes4Word32 (128-bit), and sha1rnds4/sha1msg1/sha1msg2/sha1nexte are the four SHA-1 operations — the primitives a SHA-1 written IN LOGOS is built from (AOT → hardware sha1rnds4).

§

Lanes4Of

Pack four Word32s straight into a lane register — the alloc-free constructor (no Seq).

§

SeqOfLanes4W32

§

Sha1Rnds4

§

Sha1Msg1

§

Sha1Msg2

§

Sha1Nexte

§

Lanes16Word8Make

Byte-shuffle lane (Lanes16Word8 = one __m128i): pack/unpack + shuffle (pshufb), per-byte shift, and the two interleaves — the vocabulary a SIMD hex codec WRITTEN in Logos is built from.

§

SeqOfLanes16W8

§

Splat16Word8

§

Shuffle16

§

ShrBytes16

§

InterleaveLo16

§

InterleaveHi16

§

ByteAdd16

§

Maddubs16

§

Packus16

§

Lanes8Word32

lanes8Word32(s) — pack the first 8 Word32s of a Seq into a SIMD lane vector.

§

SeqOfLanes8

seqOfLanes8(v) — unpack a Lanes8Word32 back into a Seq of 8 Word32.

§

Splat8Word32

splat8Word32(x) — broadcast a Word32 into all 8 lanes.

§

IntOfWord32

intOfWord32(w) — the unsigned value of a Word32 as an Int (for byte serialization).

§

IntOfWord64

intOfWord64(w) — the value of a Word64 as an Int (byte-masked lanes in Keccak squeeze).

§

Word64Shl

word64Shl(w, n) — logical shift-left of a Word64 (Keccak lane byte-packing).

§

Word64Shr

word64Shr(w, n) — logical shift-right of a Word64 (Keccak squeeze byte-extract).

§

Word64And

word64And(a, b) — bitwise AND of two Word64s (Keccak χ’s ¬b ∧ c).

§

Word32Shr

word32Shr(w, n) — logical shift-right of a Word32 (SHA-256’s σ0/σ1, a non-rotating shift where the vacated high bits are zero).

§

Word16Make

word16(n) — the low 16 bits of an Int as a Word16 (ℤ/2¹⁶ coefficient).

§

IntOfWord16

intOfWord16(w) — the unsigned value of a Word16 as an Int (0..2¹⁶−1).

§

Lanes4Word64

lanes4Word64(s) — pack the first 4 Word64/Ints of a Seq into a Lanes4Word64.

§

SeqOfLanes4

seqOfLanes4(v) — unpack a Lanes4Word64 into a Seq of 4 Int lanes.

§

Mul32x32To64

mul32x32to64(a, b) — lane-wise widening multiply of the low 32 bits (vpmuludq).

§

HsumLanes4

hsumLanes4(v) — the horizontal sum of a lane vector’s lanes as an Int.

§

Splat4Word64

splat4Word64(x) — broadcast a Word64 into all 4 Keccak lanes (ι constant, χ all-ones).

§

AndNot4

andNot4(a, b) — 4-way Keccak χ’s (¬a) ∧ b in one lane op (vpandn).

§

Lanes16Word16

lanes16Word16(s) — pack the first 16 Word16/Ints of a Seq into a Lanes16Word16.

§

SeqOfLanes16

seqOfLanes16(v) — unpack a Lanes16Word16 into a Seq of 16 Int lanes.

§

Splat16Word16

splat16Word16(x) — broadcast a Word16/Int into all 16 lanes.

§

Mulhi16

mulhi16(a, b) — lane-wise SIGNED high-16 multiply (vpmulhw, the Montgomery mulhi).

§

Montmul32

montmul32(a, b, q, qinv) — the signed i32 Montgomery multiply over 8 lanes (vpmuldq), the ML-DSA (Dilithium) NTT butterfly multiply (q/qinv broadcast).

§

NttBcastLo

nttBcastLo(v, h) — broadcast each 2h-block’s low h lanes into both halves (the within-vector NTT source-low duplication; vperm2i128/vpshufd by stride).

§

NttBcastHi

nttBcastHi(v, h) — broadcast each 2h-block’s high h lanes into both halves.

§

NttBlend

nttBlend(a, b, h) — each 2h-block’s low h from a, high h from b (the butterfly half-recombine; vperm2i128/vpblendd by stride).

§

MapOf

mapOf(k1, v1, k2, v2, …) — construct a Map from flat key/value pairs in INSERTION order (the {k: v, …} literal’s lowering). A duplicate key keeps its first position with the last value, like repeated Set item k of m writes.

§

SetOf

setOf(a, b, …) — construct a Set from elements in insertion order, deduplicating by value equality (the {a, b, …} literal’s lowering).

§

RepeatSeq

repeatSeq(x, n) — a fresh sequence of n slots, each an INDEPENDENT deep copy of x (the n copies of x / [x] * n fill; a repeated inner collection is n rows, never n aliases). n ≤ 0 is empty.

§

ReedSolomonEncode

reedSolomonEncode(data, parity) — systematic Reed-Solomon FEC over GF(2^8). data is a Seq of Seq of Int (byte shards of equal length); returns data.count + parity shards, the first data.count being the data unchanged (systematic), the rest parity. Any data.count of the shards reconstruct the data.

§

ReedSolomonRecover

reedSolomonRecover(received, k) — reconstruct every shard from received (a Seq of n slots, each a Seq of Int shard or nothing for an erased slot); k is the data-shard count. Succeeds when at least k of the n shards survived.

§

FecProtect

fecProtect(payload, k, m) — frame a flat byte Seq of Int, split into k shards, and Reed-Solomon encode into k + m loss-resilient packets (any k reconstruct the payload).

§

FecRestore

fecRestore(received, k) — recover the payload from received packets (nothing = lost), stripping the length header + padding to return the exact original bytes.

§

DomBody

body() — the document body (the render root), a stable Element handle.

§

DomCreateElement

createElement(tag) — a new element with the given tag name.

§

DomCreateTextNode

createTextNode(text) — a new text node.

§

DomSetText

setText(el, text) — set an element’s text content.

§

DomSetHtml

setHtml(el, html) — set an element’s raw innerHTML (verbatim markup).

§

DomClearChildren

clearChildren(el) — remove every child (the immediate-mode re-render primitive: the view clears its root, then rebuilds it).

§

DomOnMessage

onMessage(topic, handler) — subscribe to a relay topic; the handler runs per message.

★ THE TRANSPORT WAS ALREADY BUILT. logicaffeine_system::relay carries Subscribe/Publish/Event frames over one wire protocol shared by the native server, the native client and the browser WebSocket client. When a message arrives on "…": was the last trigger no tier delivered, and what it was missing was this one call — not a protocol. The host carries bytes for a topic; which topic, and what to do with the payload, are compiled LOGOS.

§

DomMoveChildren

Retired: moveChildren(from, to) reparented a holding node’s children for a {children} slot. A slot’s children are a range of the retained tree’s tape (vdom.lg), which the commit places, so no source spelling resolves to this id (retired_builtin refuses the call); the variant stays so every id after it keeps its wire position.

§

DomBeginPaint

Retired: beginPaint() opened a host-side staging pass. A repaint keeps its nodes by drawing through the retained tree (vdom.lg), so no source spelling resolves to this id (retired_builtin refuses the call); the variant stays so every id after it keeps its wire position.

§

DomSetAttribute

setAttribute(el, name, value) — set an attribute.

§

DomAppendChild

appendChild(parent, child) — append child to parent.

§

DomGetText

getText(el) — an element’s text content.

§

DomGetValue

getValue(el) — a form input’s value.

§

DomSetValue

setValue(el, value) — set a form input’s value.

§

DomApplyPatches

applyPatches(bytes) — apply a whole DOM patch stream in ONE call.

The bulk form: a program builds a buffer of operations and hands it over once, instead of making a host call per operation. That is what lets the browser host be a for loop over a stream rather than fifty entry points with behaviour behind them — the stream is the interface, and every decision belongs to the side that emitted it.

A malformed buffer fails LOUDLY and applies NOTHING: silently applying the prefix that happened to parse would leave a half-built page with nothing anywhere saying so.

§

DomSetChecked

setChecked(el, on) — set a checkbox’s or radio’s checked state.

A checkbox’s state is a PRESENCE, not a string, and it lives on the PROPERTY rather than the attribute — setAttribute(el, "checked", …) writes defaultChecked and leaves the box a visitor sees unchanged. So it gets an operation of its own rather than riding on setValue (which a checkbox ignores) or setAttribute (which lies).

§

DomPreventDefault

preventDefault(node, event) — this listener cancels the browser’s own action.

§

StorageSet

storageSet(area, key, value) / storageGet(area, key) / storageRemove(area, key) — browser storage, where area is "local" (survives closing the tab) or "session" (survives a reload, ends with the tab).

The AREA IS AN ARGUMENT rather than two families of operation, so a third area later is not a change to the host boundary; an area nobody defines is refused by name rather than written somewhere nothing reads. storageGet answers an Option of Text because a missing key and a stored empty string are different, and a page that confuses them will overwrite one with the other.

§

StorageGet

§

StorageGetOr

storageGetOr(area, key, fallback) — the stored text, or fallback when the key is not there. The absence-answering sibling of storageGet, and the one a stored value is usually READ with: “what I saved, or what I start from” is the whole question a page has.

It exists as its own operation rather than as sugar because an Option of Text is a BOXED handle on the WebAssembly tier — its presence can be tested but its value cannot yet be taken out — so a lowering that must USE a stored value goes through here, where no Option crosses the boundary at all. No new host import: it is storage_get plus a test of the answered handle.

§

StorageRemove

§

DomSetStream

setStream(el, streamHandle) — attach an opaque host MediaStream to an element’s srcObject, rendering a live video/audio track in a <video>/<audio> tile.

§

RtcPeerConnection

WebRTC browser-P2P leg. peerConnection() mints an RTCPeerConnection; dataChannel(pc, label) opens a channel; createOffer/createAnswer produce the SDP; setLocalDescription/ setRemoteDescription apply it; addIceCandidate adds a remote candidate; channelSend pushes bytes down the channel.

§

RtcDataChannel

§

RtcCreateOffer

§

RtcCreateAnswer

§

RtcSetLocal

§

RtcSetRemote

§

RtcAddIce

§

RtcSend

§

DomQuerySelector

querySelector(sel) — the first element matching a bare tag or #id (a -1 handle if none).

§

DomAddEventListener

addEventListener(el, event, handler) — register a LOGOS closure to run when event fires on el. The handler rides the B0 __logos_call_closure trampoline on wasm; on native tiers it is stored and invoked to simulate.

§

DomEventValue

eventValue(event) — the value of the input that dispatched event.

§

DomEventKey

eventKey(event) — the key of the keyboard event being dispatched ("" otherwise).

§

TryReadBytes

tryReadBytes(path) — a file’s bytes as Result of Seq of Int and Text. The total form of BuiltinId::ReadBytes: a missing or unreadable file is a value, not a trap.

§

DomEventTarget

eventTarget(event) — the element that dispatched event.

§

DomFetchText

fetchText(url, onDone) — fetch url; when it resolves, run the completion closure onDone(reqId), which reads the body via responseText().

§

DomResponseText

responseText() — the body of the fetch currently being delivered.

§

ReadBytes

readBytes(path) — a file’s raw bytes as a Seq of Int (for serving binary content like a .wasm). Native tiers only.

§

SignalNew

signal(initial) — a new reactive state cell; returns its Int handle.

§

SignalSet

signalSet(s, value) — write a signal and mark the store dirty (→ re-render).

§

SignalGetInt

signalGetInt(s) — a signal’s current value as an Int.

§

SignalGetText

signalGetText(s) — a signal’s current value as Text.

§

SignalBeginRender

beginRender() — reset the signal hooks cursor; the view’s first op on every (re-)render so its signal(...) calls return the same cells.

§

SignalNewText

signalNewText(initial) — a signal holding Text (distinct wasm ABI: the initial value and writes are a Text handle, not an Int).

§

SignalSetText

signalSetText(s, value) — write a Text signal; marks the store dirty.

§

SignalEnterComponent

enterComponent(key) — push a component’s hook scope (its per-instance identity) so its signal(...) calls get their own cells.

§

SignalExitComponent

exitComponent() — pop back to the parent component’s hook scope.

§

SignalNewSeq

signalNewSeq(initial) — a signal holding a Seq (a live collection). Like BuiltinId::SignalNewText its wasm ABI is a handle (an i32 Seq handle), the element kind riding the SeqText representation; a live list re-renders a for each view when Push/Set writes it.

§

SignalGetSeq

signalGetSeq(s) — a signal’s current value as a Seq.

§

SignalSetSeq

signalSetSeq(s, value) — write a Seq signal; marks the store dirty.

§

SignalNewFloat

signalNewFloat(initial) — a signal holding a Real.

A signal’s value family is settled at its declaration by the parser, which is the only place that can see the whole program: a float initial value, an explicit Let rate: Real be a signal 2, or a later fractional write all name this family. Saying it in the BUILTIN — exactly as Text and Seq signals already do — is what lets every function agree. A backend that had to infer float-ness from a value’s kind could only see one function at a time, so a view that read a cell an event handler wrote would disagree with it and render the float’s raw bits.

§

SignalGetFloat

signalGetFloat(s) — a signal’s current value as a Real.

§

SignalSetFloat

signalSetFloat(s, value) — write a Real signal; marks the store dirty.

§

FileRead

file.lg’s ## To native read (path) -> Result of Text and Text — the shared tree-walker/VM seam. NOT name-mapped in builtin_from_name: each tier routes here only when the callee is the EMPTY-bodied native declaration, so a user-defined read with a real body always wins (declarer-wins).

§

FileWrite

file.lg’s ## To native write (path, content) -> Result of Unit and Text — same routing rule as BuiltinId::FileRead.

§

RandomInt

random.lg’s ## To native randomInt (min, max) -> Int — the shared tree-walker/VM seam over logicaffeine_system::random. NOT name-mapped in builtin_from_name: each tier routes here only when the callee is the EMPTY-bodied native declaration, so a user-defined randomInt with a real body always wins (declarer-wins).

§

RandomFloat

random.lg’s ## To native randomFloat () -> Real — same routing rule as BuiltinId::RandomInt.

§

DomFetchSend

fetchSend(method, url, body, headers, onDone) -> Int — start a request and return its correlation id. headers is a Seq of Text alternating name,value (the flat form that crosses the wasm ABI as one seq handle); names must be on the request-header allowlist. When the response (or a structured failure) arrives the host runs onDone(reqId).

§

DomResponseStatus

responseStatus(reqId) -> Int — the HTTP status; 0 while pending or on any transport failure (responseError then names it).

§

DomResponseBody

responseBody(reqId) -> Text — the delivered body ("" pending/failed).

§

DomResponseHeader

responseHeader(reqId, name) -> Text — a response header, case-insensitive ("" when absent).

§

DomResponseError

responseError(reqId) -> Text — "" when none; else "timeout" | "abort" | "toolarge" | "network: <detail>".

§

DomFetchAbort

fetchAbort(reqId) — the request becomes final with the "abort" error; a late response can never deliver.

§

DomFetchSetTimeout

fetchSetTimeout(reqId, millis) — arm (> 0) or clear (0) a timeout; firing delivers the "timeout" error and runs the callback.

§

DomRoutePath

routePath() -> Text — the current location pathname ("/" at boot).

§

DomRouteQuery

routeQuery(name) -> Text — a query param by name ("" when absent).

§

DomNavigate

navigate(path) — history.pushState + fires the router (records the navigation, moves the current path).

§

DomReplaceRoute

replaceRoute(path) — history.replaceState (records a REPLACE navigation).

§

DomSetTitle

setTitle(t) — the document’s title. The one page-level property a page sets by name; docs/web.md teaches Set the title to "Todos"., so it was taught and unbuildable.

§

DomClipboardWrite

clipboardWrite(t) — put t on the system clipboard.

★ THREE IMPORTS RATHER THAN ONE FAMILY, unlike the element commands. Those differ only in which single method is called on the same node; these are three different CAPABILITIES with three different permission models and three different ways to be denied — a clipboard write a browser may refuse, a file the viewer may decline, a notification that needs consent. Folding them into one pageCommand would name three decisions with one word.

§

DomDownloadFile

downloadFile(content, name) — offer content to the viewer as a file called name.

§

DomNotify

notify(message, tone) — raise a notification.

§

DomPublish

publish(topic, message) — send a frame on a relay topic.

★ THE OUTWARD LEG ONLY. A page’s own subscribers are reached in compiled LOGOS, by dispatching message:<topic> through the table Raise drives; this carries the frame that genuinely leaves the page. Splitting it that way is what keeps the deciding — who hears a publish, and when — inside the module rather than in a host nobody can test.

§

DomElementCommand

elementCommand(el, command) — perform a named operation on ONE element: put the cursor in it, take the cursor out, bring it into view, select its text.

★ ONE IMPORT FOR THE FAMILY, because they differ only in which single DOM call is made and none of them decides anything. Five imports would have said the same thing five times, and the ABI is a place where saying something twice is how it drifts.

§

DomEventFileName

eventFileName(ev) -> Text — the name of the first file a drop carried, "" when it carried none. A READ of the drop’s file (a browser’s file transfer, or in process the file the host delivering the drop handed over); what the page then does about it is compiled LOGOS.

§

DomSetInterval

setInterval(ms, handler) — the browser’s clock, arming ONE repeating callback for the whole page. Which of the page’s timers that makes due is decided in compiled LOGOS (__lgx_tick), so the arithmetic is the same on a tier with no clock at all.

§

DomScrollGap

scrollGap(el) -> Int — how many pixels of el’s content sit BELOW what is visible.

★ A READING, NOT A DECISION. Whether that gap is small enough to count as “the bottom” is the page’s business and stays in compiled LOGOS; the host is only asked for the three numbers a browser holds and no other tier can know. Node 0 means the page itself.

§

DomOnWindowEvent

onWindowEvent(event, handler) — register a handler for something that happens to the PAGE rather than to an element: going offline, coming back online, the window resizing. One builtin for all of them, because they differ only in the event’s name.

§

DomGetAttribute

getAttribute(el, name) -> Text — an element’s attribute, "" when it has none. The READ half of the attribute pair. It exists so Add class/Remove class can be COMPILED LOGOS over setAttribute rather than two more host functions: a class list is space-separated words, and deciding which words survive is the framework’s job, not the host’s.

§

DomGoBack

goBack() — step one history entry back, as a visitor’s Back button does. Answers nothing; a page at its first entry simply stays where it is.

§

DomReload

reload() — the page starts over: every instance, listener and mounted root goes and the document is rebuilt. A browser does it by reloading the document; the in-process tiers do it by clearing the same two stores the reference tier clears, so the observable result is one page that has forgotten everything.

§

DomOnRoute

onRoute(handler) — register a popstate/navigation handler; a back/forward fires it with the new path. The handler rides the closure trampoline on wasm (like addEventListener/fetchText’s onDone).

§

Fail

Fail with <value>. — stop with the value’s display text as the reason. Reserved name (__logos_fail): the compiler writes the call, an author never does.

§

FailReason

A broken contract’s , otherwise <reason> — stop with the reason, which must be Text (contract_reason_text). Reserved name (__logos_fail_reason).

§

Word8Make

word8(n) — the low 8 bits of an Int as a Word8 (the ring ℤ/2⁸).

§

IntOfWord8

intOfWord8(w) — the unsigned value of a Word8 as an Int (0..255).

§

NativeKernel

A standard-library native kernel (## To native in crypto.lg): argument 0 is the kernel’s NativeKernel::code, the rest are its arguments. Reserved name (__logos_native_kernel): the VM compiler writes the call for a kernel’s declaration, an author never does.

§

NoteTurn

noteTurn(name: Text, key: Text, changes: Seq of Text, failure: Text) — records one turn in the journal natively, so the journal/Replay work on a lowered tier without a ## Store-shaped mechanism to carry it: the action’s journal name, the instance it ran against, every field whose display changed as [field, before, after, …] in declaration order, and the failure that rolled it back ("" for a turn that committed). Reserved name (noteTurn): the lowering emits the call at the end of every turn, never written by an author. Browser-only: the journal it writes into is the page’s turn history, which a device tier has none of.

§

DomSetHeadHtml

setHeadHtml(html) — the document <head>’s markup (<title>/<meta>/…), from a page’s Head: section, written through semantics::dom::set_head_html. Appended LAST, never inserted among its Dom* siblings above: a builtin’s wire id is its position in this enum (builtin_wire_id_lock.rs), so a new one is always added at the END regardless of where it reads best.

§

InspectUnhandledDynamic

The ONE place a non-exhaustive Inspect with no statically-known enum (a dynamic value — a kernel inductive, or a compilation with no type registry at all) fails LOUD instead of falling through to Fail’s generic, value-display-only message. Compiler-emitted only (vm/compiler.rs’s compile_inspect), never named from LOGOS source — it reads the ONE scrutinee register compile_inspect already evaluated and calls the SAME semantics::builtins::inspect_unhandled_message the tree-walker’s own inspect_unhandled calls, so a dynamic non-exhaustive match fails with byte-identical words on both tiers, closing the class Fail’s fallback (a bare to_display_string() of the scrutinee, no variant/type framing) could not.

§

DomEventFileSize

eventFileSize(ev) -> Int — the size in bytes of the first file a drop carried, its sibling eventFileName beside it: a File’s size is the file’s own, never a literal. A browser answers from the actual event through dom_event_file_size (vm/wasm/module.rs, runtime.js); an in-process tier answers from the file the host delivering the drop handed over (semantics::dom::dropped_file).

§

DomEventFileType

eventFileType(ev) -> Text — the first file’s MIME type, "" when it carried none or the browser named none. Answered from the same file as eventFileSize beside it.

§

DomEventFileBytes

eventFileBytes(ev) -> Seq of Int — the first file’s content, one byte per element. A browser reads the file’s arrayBuffer() BEFORE the drop’s turn runs and hands it over through dom_event_file_bytes, so the turn only ever runs with the content in hand; an in-process tier answers from the same file as eventFileSize beside it.

§

DomListenFlags

listenFlags(el, event, flags) — register event on el with the behavioural modifiers flags names (semantics::dom::LISTEN_*: prevent 1, stop 2, once 4, capture 8, passive 16), replacing any flags an earlier registration gave it. A browser attaches its listener in the capture phase or not, passive or not, stopping propagation or not; an in-process tier walks an event by the same flags (semantics::dom::dispatch_path). Browser-only.

§

DomAssignLocation

assignLocation(url) — load another document at url, as location.assign does, once the running script is done: then the page that asked is gone, and url is where the browser stands. What Navigate to a page outside this module’s own pattern lowers to; an in-process host carries the request out after the call that made it (semantics::dom::request_load), recording the load (RouteOp::Load) and starting an empty document there. Browser-only.

§

DomJournalDetail

journalDetail() -> Bool — whether this host keeps the journal’s detail, so a lowered turn captures the fields it changed only where something reads them: every in-process host records the journal and answers true; a browser answers true only under the test harness, so a shipped page pays nothing for a journal nobody keeps. Reserved name: the lowering writes the call, an author never does. Browser-only.

§

DomApplyWords

applyPatchWords(words, wordCount, strings, stringCount) — apply the first wordCount words of a wire-v2 patch stream, whose text operands index the first stringCount strings, in ONE call; answers how many adopted nodes did not match. What vdom.lg’s vdApply hands over. All or nothing, as applyPatches is.

§

DomWakeAfter

wakeAfter(ms) — ask the host to call the page’s __lgx_tick with the time that passed once ms more milliseconds have gone by, replacing any earlier request; a negative ms cancels it. The page keeps its own clock and decides every timer in compiled LOGOS; this only says when its earliest one comes due. Reserved name: the lowering writes the call, an author never does. Browser-only: an in-process host moves time only by Advance time by ….

§

DomEnterValue

enterValue(verb, selector, value) — a visitor’s Type or Choose on the element selector names, as the browser’s own default action performs it: whether the control takes the verb (crate::semantics::dom::answers_by_itself — a text field a visitor can reach takes typing, a <select> offering value takes the choice), and when it does, the value entered into it (crate::semantics::dom::enter_value). verb is "type" or "choose". The bytecode tier’s driving verbs write the call; it has no source name.

§

DomDispatchEntry

dispatchEntry(dispatcher, context, hook, node, event, value) — a driving verb the program runs on its own page, taken as the HOST’s entry into the page: the page’s dispatcher (function dispatcher, __lgx_dispatch_node) runs as an entry of its own, so a turn that fails there is contained to it — the page’s failure door hears it (the text context answers, then the hook handler, each a function index or -1 for none), the first failure no handler absorbed becomes the program’s own failure once nothing is left to run, and the program’s next statement runs. Answers whether the page heard the event; a failed turn was heard. The bytecode tier’s driving verbs write the call; it has no source name, and the engine running the page carries it out (it calls back into the program).

§

VfsReadFile

Read … from file "…".’s runtime lookup on the bytecode VM: the SAME sandboxed logicaffeine_system::fs::MemVfs the tree-walker’s ReadFrom reads through, so a file read errors identically on both tiers. Reserved name: Stmt::ReadFrom’s VM compiler arm writes the call; an author never spells it.

§

VfsWriteFile

Write … to file "…".’s runtime store on the bytecode VM: the SAME sandboxed logicaffeine_system::fs::MemVfs the tree-walker’s WriteFile writes through, so what a program wrote on either tier is what it reads back on either. Reserved name: Stmt::WriteFile’s VM compiler arm writes the call; an author never spells it.

§

VfsMount

Mount … at "…".’s runtime load on the bytecode VM: the journal file’s text from the SAME sandboxed logicaffeine_system::fs::MemVfs the tree-walker’s Mount reads, or empty Text when there is none yet — the tree-walker’s arm exactly. Reserved name: Stmt::Mount’s VM compiler arm writes the call; an author never spells it.

§

EnvGet

env.lg’s ## To native get (key) -> Option of Text — the variable key names in the environment the program runs in, none when it is unset, through logicaffeine_system::env::get (sealed-world aware). Same routing rule as BuiltinId::FileRead: system_native answers it only for the empty-bodied native declaration, so a program’s own get always wins.

§

TimeNow

time.lg’s ## To native now () -> Nat — the Unix time in milliseconds, through logicaffeine_system::time::now (sealed-world aware). Not the bare now of a moment (Op::LoadNow): this is the stdlib function, same routing rule as BuiltinId::EnvGet.

§

EnvHas

Whether the environment sets the variable name — half of the VM compiler’s expansion of BuiltinId::EnvGet into ops every downstream tier already lowers (mapOf’s rule): the Option is then built by NewInductive, as any other is. Reserved name: the VM compiler writes the call; an author never spells it.

§

EnvValue

The text of the environment variable name, "" when it is unset — the other half of the expansion BuiltinId::EnvHas describes. Reserved name, as there.

§

Infinitesimal

infinitesimal(name, modulus, residue…) — the program’s infinitesimal, the residues its reciprocal may take modulo modulus given (Let dt be an infinitesimal …).

§

StandardPart

standardPart(x[, at]) — the standard real infinitely close to a limited x (the standard part of x); an infinite value has none. Relative to the infinitesimal at, what x is infinitely close to among the values of at and the infinitesimals larger than it (the standard part of x relative to dt).

§

IsInfinitesimal

isInfinitesimal(x[, at]) — x is zero or smaller than every positive standard number, or every positive value of at and the infinitesimals larger than it.

§

IsLimited

isLimited(x[, at]) — x is bounded by a standard number, or a value of at and the infinitesimals larger than it.

§

InfinitelyClose

infinitelyClose(x, y[, at]) — x − y is infinitesimal, relative to at when it is given.

§

GeneratorOf

generatorOf(dt) — the infinite natural ⌈1/dt⌉.

§

LimitOf

limitOf(x, rule) — a residue-dependent x resolved under a named limit rule.

§

Provisional

provisional(value, cases, revisions) — the answer of a search no proof settled.

§

AtTheLimit

atTheLimit(rule) — the limit rule supertasks below it take (At the limit, take …).

§

EveryNatural

everyNatural(cases) — the iterable of Repeat for every natural n; the supertask engine replaces every such loop before a program runs.

§

TripCount

tripCount(t0, step, bound, relation) — how many times a loop stepped by a clock runs.

§

AffinePower

affinePower(matrix, state, n) — the state after n steps of an affine update.

§

CycleAt

cycleAt(states, repeated, n) — the state at step n of a run that has entered a cycle.

§

SearchCandidates

searchCandidates(terms, periods) — the naturals a search over every natural examines.

§

StateSize

stateSize(state) — the bits a supertask’s state occupies, which bounds its cycle search.

§

PolynomialFlow

polynomialFlow(field, state, n) — the state after n Euler steps of a polynomial update.

§

ExactSqrt

exactSqrt(x), exactExp(x), exactLn(x) — the square root, exponential and natural logarithm held exactly; sqrt, exp and ln are these in a context that declares an exact type.

§

ExactExp

§

ExactLn

§

ExactPi

exactPi(), exactE() — π and e held exactly; pi and e are these in an exact context.

§

ExactE

§

ExactOmega

exactOmega() — ω, the first infinite ordinal; omega is this in an Ordinal context.

§

HybridFlow

hybridFlow(model, state, n) — the state after n steps of a loop whose state flows by a polynomial Euler step between jumps.

§

FirstExit

firstExit(t0, step, guard) — how many passes a loop makes whose guard compares terms linear in a counter it steps.

§

DefinedReal

definedReal(kind, base, name, f) — the real number the function f defines by its digits in base or by its approximations (the real number whose digits in base 3 are f, the real number approximated by f).

§

ExactPower

exactPower(base, exponent) — base ** exponent to an exponent that is an exact number, which ** is when its exponent is one: a fraction takes a root (2 ** (1/2) is √2).

§

OrderedInfinitesimal

orderedInfinitesimal(name, larger, smaller, modulus, residue…) — an infinitesimal much smaller than larger and much larger than smaller, each an infinitesimal or nothing (Let dx be an infinitesimal much smaller than dt …).

§

SealBox

sealBox(key, bytes) — XChaCha20-Poly1305 under a 24-byte nonce drawn from the system’s entropy for this seal, carried in front: nonce ‖ ciphertext ‖ tag. One key seals any number of boxes with no nonce for the caller to keep apart. Inverse: openBox.

§

OpenBox

openBox(key, box) — verify the box’s tag (constant-time) and decrypt it under the nonce it carries. ERRORS on a wrong key, a tampered or truncated box, or a value box.

§

SealValueBox

sealValueBox(key, value) — sealBox of the value’s wire encoding, under its own associated data so a value box never opens as a byte box. Inverse: openValueBox.

§

OpenValueBox

openValueBox(key, box) — open a sealValueBox and wire-decode it back into the value. ERRORS on a wrong key, a tampered or truncated box, or a byte box.

§

ReadReals

readReals(path) — the Seq of Real a file of little-endian binary64 values holds, eight bytes a value in order (logicaffeine_system::file::read_reals). ERRORS on a file it cannot read or one that is not a whole number of values. The numbers a program reads at run time rather than carries as code: a model’s weights.

Implementations§

Source§

impl BuiltinId

Source

pub const ALL: &'static [BuiltinId]

Every variant, for exhaustive audits — the Syntax Guide’s builtin census (crates/logicaffeine_tests/tests/guide_coverage.rs::every_builtin_has_a_guide_home) iterates this. Append new variants here; the census’s no-wildcard match won’t compile until the new variant is classified, and its raise-only floor asserts this list never shrinks.

Source

pub fn extension(self) -> Option<Builtin>

The builtin of the exact extension this is, answered by logicaffeine_base::extension::call on every tier.

Source

pub fn answers_exact(self) -> bool

Whether this builtin answers a value of the exact extension: a builtin of it, or definedReal, whose real number every tier makes from the machine values of its kind, base, name and closure.

Source

pub fn word_result(self, arg: Option<u8>) -> Option<u8>

The width in bits of the fixed-width word this builtin returns, arg being the width of its first argument where the result is a word of that width (rotr, word_and, …); None where it returns no word. A word’s arithmetic wraps at its width, so no tier holds one as an exact Int.

Source

pub fn word_seq_result(self) -> Option<u8>

The width of the words of the sequence this builtin returns, when it returns a sequence of fixed-width words (seqOfLanes8 unpacks eight Word32s).

Source

pub fn is_browser_only(self) -> bool

Whether this builtin only exists in a BROWSER — the DOM, the reactive-signal store, and the WebRTC peer surface.

A device tier has no document. Before this existed, a page compiled “successfully” to AOT-Rust, AOT-C and CUDA — 380 bytes of Rust, 121KB of C, a GPU kernel — none of which has anything to render into, so largo build --target cuda on a ## Page produced an artifact that BUILT and could only ever draw nothing. The mistake then surfaced at run time on a device, a long way from the --target flag that caused it.

Source§

impl BuiltinId

Source

pub fn effect(self) -> BuiltinEffect

This builtin’s BuiltinEffect. Exhaustive with no wildcard: a new builtin does not compile until its effect is decided here. When in doubt a builtin is Fallible or Effectful — a builtin wrongly called Pure could be reordered or removed.

Trait Implementations§

Source§

impl Clone for BuiltinId

Source§

fn clone(&self) -> BuiltinId

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for BuiltinId

Source§

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

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

impl<'de> Deserialize<'de> for BuiltinId

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for BuiltinId

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 · 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 Serialize for BuiltinId

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for BuiltinId

Source§

impl Eq for BuiltinId

Source§

impl StructuralPartialEq for BuiltinId

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
§

impl<T> Downcast for T
where T: Any,

§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Send + Sync>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
§

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

§

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

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

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

§

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

Compare self to key and return true if they are equal.
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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,