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 ifd_kind(&self) -> IfdKind
pub fn ifd_kind(&self) -> IfdKind
IFD namespace this entry was found in. Pair with Self::ifd to
identify an entry unambiguously: the same code means different things
in different namespaces.
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
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more