Skip to main content

Module derivative_format

Module derivative_format 

Source
Expand description

The closed set of still-derivative formats and the structural check over it — the tier table’s format column as a type. Always compiled, and for the same reason lqip is: the crates that receive a DerivativeManifest (capsule-server, capsule-wasm) build with default-features = false, so a check they cannot link is a check that never runs. Depends only on crypto::provenance. The one public path to its items: media does not re-export them. The closed set of committed still-derivative formats, and the structural check over it.

SSoT: Thumbnails and Previews — the tier table’s format column is this enum, and “every receiver (and every federated peer) compares DerivativeManifest.format against this list” is verify_still_format.

§Why this is at the crate root and not in capsule_core::media

It was in media first, and that was a placement mistake rather than a constraint. media is behind the media feature that native implies, so capsule-server and capsule-wasm — both default-features = false — cannot link it. Those are exactly the two crates that receive a manifest they did not author, which is where a structural rejection has to run. A closed set only a producer can evaluate is not a closed set.

So it lives here, beside nothing and depending on nothing but crate::crypto::provenance, which is itself unconditional for the same reason. This module is the one public path to both names: media does not re-export them.

This mirrors crate::lqip: a contract every surface needs cannot live inside a feature-gated stack, however natural the stack looks as a home.

Enums§

DerivativeFormat
The closed set of committed still-derivative formats — the tier table’s format column.
DerivativeStatus
Whether an imported asset got thumbnail/preview derivatives — and if not, why

Functions§

verify_still_format
The closed-set check a receiver runs on a still-role derivative manifest.
verify_still_role_format
The same closed-set check over a bare (role, format) pair — the key-free entry point.