Expand description
Dialect identification: what a document is, as read from its own bytes.
A dialect is a named region of one format’s document space, bounded only by
discriminants the format itself declares. It exists whether or not cadmpeg
reads it. DialectMatch is the record of one run: inspect or decode
handled the file, and Admission states how.
This vocabulary is about the source document. cadmpeg’s own version
stamp, IR_VERSION, is data about cadmpeg, never merged with this one and
never sharing a type with it.
§DialectId is opaque here
DialectId is a namespaced pinned string at this layer and nothing more:
no shared enum of every format’s dialects, no version parsing, no ordering.
An IR-level enum of dialects would make the shared layer depend on every
codec, and orderings are codec-local where they are real at all. Outside its
owning codec the id is comparable and printable; only the owner parses it.
Producers use dialect_id! for checked static ids. Wire readers use
DialectId::parse for checked owned ids. A codec backs its dialects with
its own enum and returns registry-generated pinned constants from it — the
*LossCode template: enum inside, pinned string at the boundary, one
construction path, closed vocabulary. Deserialization is the only other way
an id comes into being, and it reconstructs an id that some producer pinned.
Structs§
- Dialect
Id - A registry dialect id, for example
"rhino:archive-80". - Dialect
IdError - A string is not a canonical dialect id.
- Dialect
Layers - A report’s primary format layer and any nested or carried format layers.
- Dialect
Match - One format layer’s identification of one document.
- Grammar
- Format-local name of a dialect grammar, for example
sch-sw-33103. - Grammar
Error - A string is not a format-local grammar name.
- Static
Dialect Id - A dialect id admitted from static storage.
Enums§
- Admission
- How one format layer admitted, or refused, one document.
- Dialect
Layer Error - Failure to insert a unique dialect layer.
- Format
Identity - A format identity that is either classified by a typed payload or retains only its known format.
- Layer
Instance - Whether a format layer is the sole instance or needs its carrier identity.
Traits§
- Format
Identity Payload - A classified payload whose format namespace is intrinsic to the payload.