Expand description
Unit discriminants for Quantity values.
Units are a closed set of stable numeric discriminants plus a named
escape hatch, so the wire format never depends on the spelling table of
any particular active-core release. Ids in the range 0..=66 are the
built-in physical units and are permanent: a reader that meets an id it
does not implement must reject the buffer (infinity/unknown-unit)
rather than guess. Custom units travel as Named and are matched by
exact UTF-8 name.
The numeric ids are part of the wire contract (docs/spec/layout.md
§5.2). They mirror the order of active_core::types::Unit, which is
intentional: the interop layer maps one-to-one, but the layout spec — not
that enum — is authoritative.
Enums§
- UnitTag
- A unit attached to a quantity.
Constants§
- UNIT_
MAX_ BUILTIN - Highest built-in discriminant implemented by this format version.
- UNIT_
NAMED - Discriminant reserved for a named (custom) unit.