Skip to main content

verify_still_format

Function verify_still_format 

Source
pub fn verify_still_format(
    manifest: &DerivativeManifest,
) -> Result<Option<DerivativeFormat>, String>
Expand description

The closed-set check a receiver runs on a still-role derivative manifest.

Returns the parsed format for a thumbnail or preview manifest whose format is in the closed set. An embedding-role manifest is not rejected: its format is embedding/{model_id}, which this set deliberately does not model, so it is reported as None rather than as a violation.

§Errors

media::MediaError::UnsupportedFormat — which carries the still format Capsule would have needed — is not what an unrecognised value produces, because there is no still format to name (and this module cannot reference media in any case: it is unconditional and media is not). An unrecognised still-role format is Err(format.to_string()).