[][src]Trait tiff_encoder::ifd::types::TiffType

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

A type of data for TIFF fields.

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

Required methods

fn id() -> u16

The TIFF 16-bit code that identifies the type.

fn size() -> u32

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

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().

Loading content...

Implementors

impl TiffType for ASCII[src]

impl TiffType for BYTE[src]

impl TiffType for DOUBLE[src]

impl TiffType for FLOAT[src]

impl TiffType for IFD[src]

impl TiffType for LONG[src]

impl TiffType for RATIONAL[src]

impl TiffType for SBYTE[src]

impl TiffType for SHORT[src]

impl TiffType for SLONG[src]

impl TiffType for SRATIONAL[src]

impl TiffType for SSHORT[src]

impl TiffType for UNDEFINED[src]

Loading content...