zenmeta/metadata.rs
1//! Retention implementation entry points for already extracted metadata.
2//!
3//! These preserve the published filtering behavior. Container-aware rewrites
4//! should use `rewrite::Context`, which additionally enforces byte budgets and
5//! rendering constraints. This module does not certify whole-file privacy.
6use zencodec::{Metadata, MetadataPolicy};
7
8/// Filter an extracted record and reconcile its EXIF orientation.
9///
10/// The legacy implementation remains in zencodec until its next breaking
11/// release. Delegating keeps one implementation during that compatibility period.
12/// Gain-map callers use [`crate::display::filter_for_gain_map`] to validate the
13/// rendering dependency as well.
14#[allow(deprecated)]
15pub fn filter(metadata: &Metadata, policy: &MetadataPolicy) -> Metadata {
16 metadata.filtered(policy)
17}