Skip to main content

Module format

Module format 

Source

Structs§

CodecCaps
What a codec can do. Every field defaults to false (or, for detects_corruption, its equivalent conservative variant): a backend must opt in.
ContainerCaps
What a container can do, and what it needs from its input.
FormatId
A stable, human-readable format identifier. &'static str rather than an enum so stuffr-formats can add formats without editing this crate.
FormatMeta
Registration metadata for one format.
MagicRule
A magic-byte rule. Detection matches these against a bounded prefix.

Enums§

CorruptionDetection
Whether decoding a stream this codec itself wrote will notice corruption rather than silently returning wrong bytes, and — where it does — what kind of guarantee that is. A single bool used to carry this and meant two different things depending on the codec: a format-wide guarantee for gzip, but only “this build’s encoder turns on an optional checksum” for zstd. A caller reading one undifferentiated bool had no way to tell which promise it was getting, so the two review findings that added careful wording to the old field’s doc comment are migrated here, one paragraph per variant.
FormatKind