pub enum Exif {
Raw(Vec<u8>),
Fields(ExifFields),
}Expand description
EXIF metadata - either raw bytes or built from common fields.
Use Exif::raw for user-provided EXIF TIFF bytes, or Exif::build
to construct EXIF from common fields like orientation and copyright.
The two modes are mutually exclusive at compile time - you cannot accidentally mix raw bytes with field-based building.
Variants§
Raw(Vec<u8>)
Raw EXIF TIFF bytes (without the Exif\0\0 APP1 prefix).
Fields(ExifFields)
Built from common fields.
Implementations§
Source§impl Exif
impl Exif
Sourcepub fn raw(bytes: impl Into<Vec<u8>>) -> Self
pub fn raw(bytes: impl Into<Vec<u8>>) -> Self
Create EXIF from raw TIFF bytes.
The bytes should be raw TIFF data without the Exif\0\0 APP1 prefix
(the encoder adds that automatically).
Sourcepub fn build() -> ExifFields
pub fn build() -> ExifFields
Start building EXIF from common fields.
Returns an ExifFields builder that can be chained with
.orientation() and .copyright() methods.
Trait Implementations§
Source§impl From<ExifFields> for Exif
impl From<ExifFields> for Exif
Source§fn from(fields: ExifFields) -> Self
fn from(fields: ExifFields) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Exif
impl RefUnwindSafe for Exif
impl Send for Exif
impl Sync for Exif
impl Unpin for Exif
impl UnwindSafe for Exif
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