Struct IfdDecoder
pub struct IfdDecoder<'lt> { /* private fields */ }
Reads a directory's tag values from an underlying stream.
Implementations
impl IfdDecoder<'_>
fn find_entry(&self, tag: Tag) -> Option<Entry>Retrieve the IFD entry for a given tag, if it exists.
The entry contains the metadata of the value, that is its type and count from which we can calculate a total byte size.
fn find_tag(&mut self, tag: Tag) -> TiffResult<Option<Value>>Tries to retrieve a tag. Return
Ok(None)if the tag is not present.fn find_tag_buf(&mut self, tag: Tag, buf: &mut ValueBuffer) -> TiffResult<Option<Entry>>Retrieve a tag and reproduce its bytes into the provided buffer.
The buffer is unmodified if the tag is not present.
fn find_tag_bytes(&mut self, tag: Tag, buf: &mut [u8], offset: u64) -> TiffResult<Option<usize>>Read bytes of a tag's value into a byte buffer.
fn find_tag_unsigned<T: TryFrom<u64>>(&mut self, tag: Tag) -> TiffResult<Option<T>>Tries to retrieve a tag and convert it to the desired unsigned type.
fn find_tag_unsigned_vec<T: TryFrom<u64>>(&mut self, tag: Tag) -> TiffResult<Option<Vec<T>>>Tries to retrieve a vector of all a tag's values and convert them to the desired unsigned type.
fn get_tag_unsigned<T: TryFrom<u64>>(&mut self, tag: Tag) -> TiffResult<T>Tries to retrieve a tag and convert it to the desired unsigned type. Returns an error if the tag is not present.
fn get_tag(&mut self, tag: Tag) -> TiffResult<Value>Tries to retrieve a tag. Returns an error if the tag is not present
fn get_tag_u32(&mut self, tag: Tag) -> TiffResult<u32>Tries to retrieve a tag and convert it to the desired type.
fn get_tag_u64(&mut self, tag: Tag) -> TiffResult<u64>fn get_tag_f32(&mut self, tag: Tag) -> TiffResult<f32>Tries to retrieve a tag and convert it to the desired type.
fn get_tag_f64(&mut self, tag: Tag) -> TiffResult<f64>Tries to retrieve a tag and convert it to the desired type.
fn get_tag_u32_vec(&mut self, tag: Tag) -> TiffResult<Vec<u32>>Tries to retrieve a tag and convert it to the desired type.
fn get_tag_u16_vec(&mut self, tag: Tag) -> TiffResult<Vec<u16>>fn get_tag_u64_vec(&mut self, tag: Tag) -> TiffResult<Vec<u64>>fn get_tag_f32_vec(&mut self, tag: Tag) -> TiffResult<Vec<f32>>Tries to retrieve a tag and convert it to the desired type.
fn get_tag_f64_vec(&mut self, tag: Tag) -> TiffResult<Vec<f64>>Tries to retrieve a tag and convert it to the desired type.
fn get_tag_u8_vec(&mut self, tag: Tag) -> TiffResult<Vec<u8>>Tries to retrieve a tag and convert it to a 8bit vector.
fn get_tag_ascii_string(&mut self, tag: Tag) -> TiffResult<String>Tries to retrieve a tag and convert it to a ascii vector.
fn directory(&self) -> &DirectoryInspect the raw underlying directory.
impl<'l> IfdDecoder<'l>
fn tag_iter(self) -> impl Iterator<Item = TiffResult<(Tag, Value)>> + 'lReturns an iterator over all tags in the current image, along with their values.
Auto Trait Implementations
impl<'lt> !RefUnwindSafe for IfdDecoder<'lt>
impl<'lt> !Send for IfdDecoder<'lt>
impl<'lt> !Sync for IfdDecoder<'lt>
impl<'lt> !UnwindSafe for IfdDecoder<'lt>
impl<'lt> Freeze for IfdDecoder<'lt>
impl<'lt> Unpin for IfdDecoder<'lt>
impl<'lt> UnsafeUnpin for IfdDecoder<'lt>
Blanket Implementations
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for IfdDecoder<'lt>
where
ST: ?Sized,
DT: ?Sized,
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for IfdDecoder<'lt>
where
ST: ?Sized,
DT: ?Sized,
impl<T> Any for IfdDecoder<'lt>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for IfdDecoder<'lt>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for IfdDecoder<'lt>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> From<T> for IfdDecoder<'lt>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Read<Exclusive, BecauseExclusive> for IfdDecoder<'lt>
where
T: ?Sized,
impl<T, U> Into<U> for IfdDecoder<'lt>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for IfdDecoder<'lt>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for IfdDecoder<'lt>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>