pub struct ImageMetadata<E: ExifRepr = Exif> {
pub exif: Option<E>,
pub format: Option<ImageFormatMetadata>,
}Expand description
Structured image-metadata view: EXIF (if any) plus format-specific metadata (if any).
Default E = Exif — eager EXIF representation. The
MediaParser::parse_image_metadata method returns
ImageMetadata<ExifIter> (lazy); convert to the default eager form
via .into() when desired.
Forward-compat note: this struct is shaped to be reused
unchanged by a future v4 redesign of the Metadata
enum (Metadata::Image(ImageMetadata)).
Fields§
§exif: Option<E>EXIF tags found in the source image, if any. For PNG, this
includes legacy Raw profile type {exif,APP1} hex-encoded
EXIF transparently merged.
format: Option<ImageFormatMetadata>Format-specific metadata that does not fit the EXIF/IFD
abstraction (e.g. PNG tEXt chunks).
Trait Implementations§
Source§impl<E: Clone + ExifRepr> Clone for ImageMetadata<E>
impl<E: Clone + ExifRepr> Clone for ImageMetadata<E>
Source§fn clone(&self) -> ImageMetadata<E>
fn clone(&self) -> ImageMetadata<E>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<E: ExifRepr> Default for ImageMetadata<E>
impl<E: ExifRepr> Default for ImageMetadata<E>
Source§impl<'de, E> Deserialize<'de> for ImageMetadata<E>where
E: Deserialize<'de> + ExifRepr,
impl<'de, E> Deserialize<'de> for ImageMetadata<E>where
E: Deserialize<'de> + ExifRepr,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<ImageMetadata<ExifIter>> for ImageMetadata<Exif>
impl From<ImageMetadata<ExifIter>> for ImageMetadata<Exif>
Source§fn from(m: ImageMetadata<ExifIter>) -> Self
fn from(m: ImageMetadata<ExifIter>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<E> Freeze for ImageMetadata<E>where
E: Freeze,
impl<E> RefUnwindSafe for ImageMetadata<E>where
E: RefUnwindSafe,
impl<E> Send for ImageMetadata<E>where
E: Send,
impl<E> Sync for ImageMetadata<E>where
E: Sync,
impl<E> Unpin for ImageMetadata<E>where
E: Unpin,
impl<E> UnsafeUnpin for ImageMetadata<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for ImageMetadata<E>where
E: UnwindSafe,
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