Module dc_mixed_serde

Module dc_mixed_serde 

Source
Expand description

Serialization and deserialization infrastructure for DcMixed documents.

Provides the DcMixedEncode and DcMixedDecode traits, DcProjectionContext, primitive codec implementations, and universal roundtrip verification.

Structs§

BinaryPayload
Wrapper for raw binary byte buffers serialized via TYPE_BINARY_SHA256 encapsulation (Dc 203 .. Dc 204).
DcEpochTimestamp
Platform-independent Unix epoch timestamp with exact 1-nanosecond resolution (sec signed seconds since 1970-01-01T00:00:00Z and nsec in 0..1_000_000_000).
DcProjectionContext
Execution context for projecting typed values from parsed syntax nodes in a DcSyntaxArena.
FieldProjectionSpec
Normalized field input shared by ordinary and flattened record projection.
LazyBinaryPayload
Binary data retained as an owned buffer or an offset in a backing document.

Enums§

DcRawValue
A general, struct-agnostic mixed-mode raw value representation.

Traits§

DcMixedDecode
Trait for types that can be projected from a parsed NodeId in a DcSyntaxArena.
DcMixedEncode
Serializes values to DcMM through a shared, fallible streaming encoder.
DcMixedFlattened
Trait for types whose fields can be serialized or deserialized in a flattened context.
DcMixedNumber
Trait for types that can convert to and from a numeric Dc representation. Used for fields with equivalent numeric representations (equivalents = (..., number)).
LosslessWithContext
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 DcMixed buffer, 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 original to DcMstring and 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.