Expand description
Opaque compile-time byte blobs — constants wider than a Literal can hold.
A numeric Literal is a single u64; constants
that exceed 64 bits (SSE/AVX register pools, wide stack/memory reads, the
result of coalescing several adjacent constant stores) cannot be represented
that way without breaking the u64-centric folding pipeline. A Bytes
value sidesteps that: it is a raw, opaque byte vector with no arithmetic
meaning, stored as a little-endian, memory-order snapshot (data[i] is the
byte at base + i, matching the target’s fixed little-endian layout).
Every Bytes carries a TypeId — typically an Array(i8, len) — with the
invariant size_of(type_id) == data.len(), enforced at construction. Unlike
numeric literals, Bytes values are not interned: each construction
produces a fresh BytesId, so downstream equality must compare contents,
never IDs.
Structs§
Enums§
- Bytes
Display - How a
Bytesblob should be rendered as ab"..."literal. - String
Encoding - The encoding under which a byte blob was successfully read as text.
Functions§
- decode_
string - Attempt to decode
dataas a printable ASCII or UTF-16LE string. - escape_
decoded - Escape a decoded string for display inside
b"..."quotes. - render_
bytes_ literal - Render
dataas the fullb"..."literal text undermode.