Skip to main content

Module record

Module record 

Source
Expand description

The host-independent shape of a domain record (#123).

A domain view borrows the model and cannot cross a language boundary, so each domain operation returns an owned snapshot: typed Rust structs for native callers, and the same data as a Record for the hosts. A record is a named list of named fields in a fixed order, so every host converts every domain with one function and the three cannot disagree about a field:

  • JavaScript: a plain object; field names become camelCase, ids and Field::Int are bigint, counts and reals number, an absent value undefined.
  • Python: a frozen dataclass named Record::name, field names as written here (snake_case), ids int, absent None.
  • C: one value tape, through Record::to_tagged: each record is a LIST of its field values in declaration order.

IFC values travel as Field::Value, in the lossless tagged encoding (ADR 0013), never folded into a host number.

Structs§

Record
A named, ordered list of fields.

Enums§

Field
One field value.

Traits§

ToRecord
A snapshot that every host carries as a Record.

Functions§

to_records
Convert a list of snapshots, the shape every list-returning domain operation hands to a host.