Skip to main content

Module opaque

Module opaque 

Source
Expand description

Canonical opaque value representation for hold-last state and hashing.

Canonical form:

  • Scalar/enum/bool: one u64 word = Slot.0.
  • String: bytes, length; hash is over len:u64 + each byte as u64 (legacy parity).
  • List: len:u64 + one u64 word per element. Quantized numeric elements store integer q as sign-extended u64 bits. Unquantized numeric elements store raw wire bits (f64/f32 bits, integer bits).

Structs§

OpaquePoolState
Pool-backed canonical opaque hold-last state. words stores list elements (or one scalar word at index 0). bytes stores string bytes.
WordIter
Iterator over the canonical u64 words of an OpaqueRef.

Enums§

OpaqueKind
OpaqueRef
A borrowed canonical opaque value.

Functions§

eq_opaque
hash_opaque
hash_value
numeric_list_word
Canonicalize a numeric list element. Quantized: sign-extended q as u64 bits. Unquantized: raw wire bits as stored in Slot.