pub struct ExifIterEntry { /* private fields */ }Expand description
Lazy yield from ExifIter. Carries a value xor error invariant —
every entry holds exactly one of Self::value or Self::error.
§Why private fields?
Public fields would let callers construct nonsense like value=Some, error=Some. Private fields + getters preserve the invariant while
exposing the natural API: Self::result for borrowed access,
Self::into_result for ownership transfer (consumes self, no panic
path).
Implementations§
Source§impl ExifIterEntry
impl ExifIterEntry
Sourcepub fn ifd(&self) -> IfdIndex
pub fn ifd(&self) -> IfdIndex
IFD this entry was found in (IfdIndex::MAIN for the primary image).
Sourcepub fn value(&self) -> Option<&EntryValue>
pub fn value(&self) -> Option<&EntryValue>
Borrow the value. None iff this entry hit a parse error.
Sourcepub fn error(&self) -> Option<&EntryError>
pub fn error(&self) -> Option<&EntryError>
Borrow the error. None iff this entry parsed successfully.
Sourcepub fn result(&self) -> Result<&EntryValue, &EntryError>
pub fn result(&self) -> Result<&EntryValue, &EntryError>
Borrow either value or error, mirroring the underlying invariant.
Sourcepub fn into_result(self) -> Result<EntryValue, EntryError>
pub fn into_result(self) -> Result<EntryValue, EntryError>
Consume self and return the value or error. No second-call panic path (the entry is moved out).
Trait Implementations§
Source§impl Clone for ExifIterEntry
impl Clone for ExifIterEntry
Source§fn clone(&self) -> ExifIterEntry
fn clone(&self) -> ExifIterEntry
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 moreAuto Trait Implementations§
impl Freeze for ExifIterEntry
impl RefUnwindSafe for ExifIterEntry
impl Send for ExifIterEntry
impl Sync for ExifIterEntry
impl Unpin for ExifIterEntry
impl UnsafeUnpin for ExifIterEntry
impl UnwindSafe for ExifIterEntry
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