Skip to main content

Module digest

Module digest 

Source
Expand description

Content digest: the identity of one blob in the asset-negotiation protocol. A caller announces the assets a render needs by digest, the server answers with the ones it does not hold yet.

Digest is a newtype rather than a bare String because the server must never trust a caller-supplied digest: it is used as a lookup key for stored blob bytes, so anything that is not exactly 64 lowercase hex characters is rejected at the deserialization boundary instead of reaching storage.

Structs§

Digest
A validated lowercase-hex sha256 digest.

Enums§

DigestError
Why a string is not a valid Digest. Hand-written rather than derived with thiserror, to keep this crate on serde alone.

Constants§

DIGEST_HEX_LEN
Number of hex characters in a sha256 digest.