pub struct Metadata {
pub icc_profile: Option<Vec<u8>>,
pub exif: Option<Vec<u8>>,
pub xmp: Option<Vec<u8>>,
}Expand description
Optional sidecar metadata carried by a WebP extended (VP8X) container.
Fields§
§icc_profile: Option<Vec<u8>>ICC color profile (ICCP chunk).
exif: Option<Vec<u8>>Exif metadata (EXIF chunk).
xmp: Option<Vec<u8>>XMP metadata (XMP chunk).
Implementations§
Source§impl Metadata
impl Metadata
Sourcepub const fn is_empty(&self) -> bool
pub const fn is_empty(&self) -> bool
Whether no metadata is present (so a bare VP8L file suffices).
Sourcepub fn resolve(&self, inherited: &Self, policy: MetadataPolicy) -> Self
pub fn resolve(&self, inherited: &Self, policy: MetadataPolicy) -> Self
Fold self (a per-field override), the inherited source metadata, and a
MetadataPolicy into the effective metadata to embed. Per field: an
override value in self wins; otherwise the inherited value is kept, gated
by the policy. ICC is never gated — it is inherited (or replaced) but never
dropped; only the privacy-bearing Exif/XMP sidecars are gated.
Trait Implementations§
impl Eq for Metadata
impl StructuralPartialEq for Metadata
Auto Trait Implementations§
impl Freeze for Metadata
impl RefUnwindSafe for Metadata
impl Send for Metadata
impl Sync for Metadata
impl Unpin for Metadata
impl UnsafeUnpin for Metadata
impl UnwindSafe for Metadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more