Trait TiffType

Source
pub trait TiffType {
    // Required methods
    fn id() -> u16;
    fn size() -> u32;
    fn write_to(self, file: &mut EndianFile) -> Result<()>;
}
Expand description

A type of data for TIFF fields.

Other types that might come to exist can be easily implemented by implementing this trait.

Required Methods§

Source

fn id() -> u16

The TIFF 16-bit code that identifies the type.

Source

fn size() -> u32

The number of bytes occupied by a single value of this type.

Source

fn write_to(self, file: &mut EndianFile) -> Result<()>

The function that writes this type to a given EndianFile.

§Panics

Will panic if the number of bytes written to the file is different than the number of bytes specified in size().

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§