Skip to main content

Module fields

Module fields 

Source
Expand description

The map type used for sample fields.

Fields are keyed by short file extensions such as png or cls, and their order matters — it is the order the files appeared in the archive. That calls for an insertion-ordered map, and for a hasher that is cheap on short keys rather than one hardened against adversarial input.

FieldHasher is FNV-1a: deterministic, fast on a handful of bytes, and available without the standard library, which is what lets the data model build for no_std targets.

Structs§

Fnv1a
The FNV-1a hash, 64-bit variant.

Functions§

fields
An empty field map.

Type Aliases§

FieldHasher
The hasher used for field maps.
Fields
An insertion-ordered map from field name to value.
Map
An insertion-ordered map with the same hasher, over any value type.