Module dc_mixed

Module dc_mixed 

Source
Expand description

Mixed-mode Document Character String (DcMstring, DcMstr) for the DcMixed format (.dcmm).

Provides borrowed and owned types for DcTF mixed-mode data containing embedded binary payloads with direct (non-base64) storage and optional SHA-256 integrity verification.

Structs§

DcMixedChunks
An iterator yielding DcMixed chunks from payload bytes.
DcMstr
A borrowed slice representing valid DcMixed format data (.dcmm). Analogous to DcStr and Rust’s str.
DcMstring
An owned, growable buffer containing valid DcMixed (Dc mixed mode) format data (.dcmm). Analogous to DcString and Rust’s String.
DcmmStreamOptions
Options controlling streaming validation and copying of .dcmm streams.
FormatLog

Enums§

DcMixed
A segment of data in a DcMixed document.
DcMixedError
Errors encountered while parsing or validating DcMixed / DcMstring data.
DcMixedOwned
An owned segment of data in a DcMixed document.

Constants§

DCMM_HEADER_LEN
Total length of the DcMixed document header (21 bytes).
DCMM_MAGIC
Magic header bytes for the DcMixed format (DcMM\0).
DCMM_UUID
Binary equivalent of DcMixed2 format UUID b0327a84-b745-492c-b39d-77c2827e3a6f.
DCMM_UUID_V1
Binary equivalent of legacy DcMixed1 format UUID d5ab819e-9b8e-4d61-adbc-933e8851e79a.
DC_203_BYTES
Pre-computed DcTF byte sequence for Dc 203 (SHORT_DC_REGION_START + 203).
DC_203_BYTES_V1
Pre-computed legacy UTF-8e-128 (DcUtf) byte sequence for Dc 203 (SHORT_DC_REGION_START + 203).
DC_END_ENCAPSULATION_BINARY
See description for 203 (Dc 204).
DC_START_ENCAPSULATION_BINARY
Arbitrary binary data (base64 encoded, no semantic significance assigned to it unless optional type is specified). Optional length counts decoded payload bytes; optional checksum covers those bytes. (Dc 203).
TYPE_BINARY
Type byte indicating direct binary encapsulation (unchecksummed).
TYPE_BINARY_METADATA
Direct binary payload with a length-delimited DcTF metadata block.
TYPE_BINARY_SHA256
Type byte indicating direct binary encapsulation with a 32-byte SHA-256 checksum.

Functions§

dcmm1_to_dcmstring
Decodes legacy DcMixed1 (.dcmm v1, using DcUtf) bytes into a DcMstring (DcMixed2).
dcmm1_to_dcmstring_with_options
Decodes legacy DcMixed1 (.dcmm v1, using DcUtf) bytes into a DcMstring with explicit strict or permissive (best_effort) options.
dcmm2_to_dcmstring
Decodes in-memory DcMixed2 (.dcmm) bytes into a DcMstring.
dcmm2_to_dcmstring_with_options
Decodes in-memory DcMixed2 (.dcmm) bytes into a DcMstring with explicit strict or permissive (best_effort) options.
dcmm_to_dcmstring
Decodes in-memory .dcmm bytes (DcMixed2 or legacy DcMixed1) into a DcMstring.
dcmm_to_dcmstring_with_options
Decodes in-memory .dcmm bytes (DcMixed2 or legacy DcMixed1) into a DcMstring with explicit strict or permissive (best_effort) options.
dcmstring_to_dcmm
Encodes a DcMstring into DcMixed2 (.dcmm) bytes.
dcmstring_to_dcmm1
Encodes a DcMstring into legacy DcMixed1 (.dcmm v1, using DcUtf) bytes.
dcmstring_to_dcmm2
Encodes a DcMstring into DcMixed2 (.dcmm) bytes.
validate_and_copy_dcmm_stream
Validates the 21-byte DcMM header from reader, then streams the verified .dcmm stream to writer with strict validation. Returns the total bytes written.
validate_and_copy_dcmm_stream_with_options
Validates and copies a .dcmm stream from reader to writer according to the specified validation options.
validate_dcmst
Validates that bytes contains valid DcMixed format data.

Type Aliases§

DcMixedChunk
Type alias for DcMixed.
DcMstSlice
Slice alias for consistency.