pub struct DirectoryEncoder<'a, W: 'a + Write + Seek, K: TiffKind> { /* private fields */ }Expand description
Low level interface to encode ifd directories.
You should call finish on this when you are finished with it.
Encoding can silently fail while this is dropping.
Implementations§
Source§impl<'a, W: 'a + Write + Seek, K: TiffKind> DirectoryEncoder<'a, W, K>
impl<'a, W: 'a + Write + Seek, K: TiffKind> DirectoryEncoder<'a, W, K>
Sourcepub fn write_tag<T: TiffValue>(&mut self, tag: Tag, value: T) -> TiffResult<()>
pub fn write_tag<T: TiffValue>(&mut self, tag: Tag, value: T) -> TiffResult<()>
Write a single ifd tag.
Sourcepub fn write_data<T: TiffValue>(&mut self, value: T) -> TiffResult<u64>
pub fn write_data<T: TiffValue>(&mut self, value: T) -> TiffResult<u64>
Write some data to the tiff file, the offset of the data is returned.
This could be used to write tiff strips.
Sourcepub fn set_parent(&mut self, offset: &DirectoryOffset<K>)
pub fn set_parent(&mut self, offset: &DirectoryOffset<K>)
Define the parent directory.
Each directory has an offset based link to its successor, forming a linked list in the
file. The encoder writes its own offset into the parent’s field when Self::finish is
called or it is dropped. This redefines the parent. An offset representation of the parent
must be acquired by finishing it with Self::finish_with_offsets.
Sourcepub fn finish(self) -> TiffResult<()>
pub fn finish(self) -> TiffResult<()>
Write out the ifd directory itself.
pub fn finish_with_offsets(self) -> TiffResult<DirectoryOffset<K>>
Trait Implementations§
Auto Trait Implementations§
impl<'a, W, K> Freeze for DirectoryEncoder<'a, W, K>
impl<'a, W, K> RefUnwindSafe for DirectoryEncoder<'a, W, K>where
K: RefUnwindSafe,
W: RefUnwindSafe,
impl<'a, W, K> Send for DirectoryEncoder<'a, W, K>
impl<'a, W, K> Sync for DirectoryEncoder<'a, W, K>
impl<'a, W, K> Unpin for DirectoryEncoder<'a, W, K>where
K: Unpin,
impl<'a, W, K> !UnwindSafe for DirectoryEncoder<'a, W, K>
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