Skip to main content

Ifd

Struct Ifd 

Source
pub struct Ifd {
Show 14 fields pub at: u64, pub end: u64, pub kind: Kind, pub name: String, pub followed: bool, pub entries: Vec<Entry>, pub next: u64, pub problem: Option<String>, pub notes: Vec<String>, pub parent: Option<(usize, usize)>, pub roles: Vec<(Kind, bool)>, pub last: BTreeMap<u16, usize>, pub first_unknown: Option<usize>, pub depth: u8,
}
Expand description

One directory.

Fields§

§at: u64§end: u64

End of the bytes it covers, clipped to the TIFF’s limit.

§kind: Kind§name: String§followed: bool

Whether the decode path reads this directory by any path.

§entries: Vec<Entry>§next: u64

Raw next-IFD pointer (relative to the TIFF’s base).

§problem: Option<String>

Why the directory could not be read whole.

§notes: Vec<String>

Remarks about its next pointer.

§parent: Option<(usize, usize)>

The IFD and entry whose pointer led here (None for the IFD chain).

§roles: Vec<(Kind, bool)>

Every kind of path that leads here, the first one first, each with whether the decode path follows it (a SubIFD that is also the EXIF IFD, an EXIF IFD that is also page 1).

§last: BTreeMap<u16, usize>

Index of the last entry with each tag (decoders keeping a map keep the last of duplicate tags).

§first_unknown: Option<usize>

Index of the first entry with a field type TIFF does not define.

§depth: u8

Pointer hops from the first directory of the walk (chained IFDs keep their predecessor’s depth), as decoders that cap recursion count.

Implementations§

Source§

impl Ifd

Source

pub fn is(&self, kind: Kind) -> bool

Whether the IFD was reached as kind by any path.

Source

pub fn followed_as(&self, kind: Kind) -> bool

Whether the decode path follows a path that reaches it as kind.

Source

pub fn page(&self) -> Option<u32>

Whether some path reaches it as a page of the main chain.

Source

pub fn holds_image(&self) -> bool

Whether some path reaches it as an image directory (a page or a SubIFD).

Trait Implementations§

Source§

impl Debug for Ifd

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl Freeze for Ifd

§

impl RefUnwindSafe for Ifd

§

impl Send for Ifd

§

impl Sync for Ifd

§

impl Unpin for Ifd

§

impl UnsafeUnpin for Ifd

§

impl UnwindSafe for Ifd

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.