Expand description
Serialization and deserialization infrastructure for DcMixed documents.
Provides the DcMixedEncode and DcMixedDecode traits,
DcProjectionContext, primitive codec implementations, and universal
roundtrip verification.
Structs§
- Binary
Payload - Wrapper for raw binary byte buffers serialized via
TYPE_BINARY_SHA256encapsulation (Dc 203..Dc 204). - DcEpoch
Timestamp - Platform-independent Unix epoch timestamp with exact 1-nanosecond
resolution (
secsigned seconds since1970-01-01T00:00:00Zandnsecin0..1_000_000_000). - DcProjection
Context - Execution context for projecting typed values from parsed syntax nodes in a
DcSyntaxArena. - Field
Projection Spec - Normalized field input shared by ordinary and flattened record projection.
- Lazy
Binary Payload - Binary data retained as an owned buffer or an offset in a backing document.
Enums§
- DcRaw
Value - A general, struct-agnostic mixed-mode raw value representation.
Traits§
- DcMixed
Decode - Trait for types that can be projected from a parsed
NodeIdin aDcSyntaxArena. - DcMixed
Encode - Serializes values to DcMM through a shared, fallible streaming encoder.
- DcMixed
Flattened - Trait for types whose fields can be serialized or deserialized in a flattened context.
- DcMixed
Number - Trait for types that can convert to and from a numeric Dc representation.
Used for fields with equivalent numeric representations (
equivalents = (..., number)). - Lossless
With Context - Trait indicating whether an alternative representation is lossless given serialization context.
Functions§
- assert_
dc_ document_ roundtrip - Asserts that a document struct serializes into a valid
DcMixedbuffer, conforms strictly to all documented syntax rules from the Dc database, decodes to an identical instance, and re-encodes identically. - assert_
dc_ roundtrip - Asserts that serializing
originaltoDcMstringand deserializing it produces an identical instance, and that re-encoding produces byte-identical output. - decode_
filepath_ segments - Decodes a typed filepath without interpreting its bytes on the host OS.
- decode_
format_ representation - Decodes a value within the declared format representation boundaries.
- encode_
filepath_ segments - Encodes raw filename segments as a typed filepath, retaining empty segments for leading, repeated, and trailing delimiters.
- encode_
filepath_ segments_ to - encode_
format_ representation - Encodes a value within the declared format representation boundaries.
- encode_
format_ representation_ to - extract_
flag_ nodes - Extracts flag items
(tag, item_id)from a flags container node. Handles: - finish_
flattened_ field - Finalizes a flattened field using the containing record’s recovery policy.
- path_
from_ native_ bytes - Resolves native Unix bytes or canonical Windows WTF-8 without replacement.