pub struct Exif { /* private fields */ }
Expand description
A struct that holds the parsed Exif attributes.
Examples
// Get a specific field.
let xres = exif.get_field(Tag::XResolution, In::PRIMARY)?;
assert_eq!(xres.display_value().with_unit(&exif).to_string(),
"72 pixels per inch");
// Iterate over all fields.
for f in exif.fields() {
println!("{} {} {}", f.tag, f.ifd_num, f.display_value());
}
Implementations
sourceimpl Exif
impl Exif
sourcepub fn buf(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
pub fn buf(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[u8]
Returns the slice that contains the TIFF data.
sourcepub fn fields(&self) -> impl ExactSizeIterator<Item = &Field>
pub fn fields(&self) -> impl ExactSizeIterator<Item = &Field>
Returns an iterator of Exif fields.
sourcepub fn little_endian(&self) -> bool
pub fn little_endian(&self) -> bool
Returns true if the Exif data (TIFF structure) is in the little-endian byte order.
Auto Trait Implementations
impl !RefUnwindSafe for Exif
impl Send for Exif
impl !Sync for Exif
impl Unpin for Exif
impl UnwindSafe for Exif
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more