Trait tiff::encoder::TiffValue

source ·
pub trait TiffValue {
    const BYTE_LEN: u32;
    const FIELD_TYPE: Type;

    // Required methods
    fn count(&self) -> u32;
    fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>;

    // Provided method
    fn bytes(&self) -> u32 { ... }
}
Expand description

Trait for types that can be encoded in a tiff file

Required Associated Constants§

Required Methods§

source

fn count(&self) -> u32

source

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

Provided Methods§

source

fn bytes(&self) -> u32

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl TiffValue for f32

source§

const BYTE_LEN: u32 = 4u32

source§

const FIELD_TYPE: Type = Type::FLOAT

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for f64

source§

const BYTE_LEN: u32 = 8u32

source§

const FIELD_TYPE: Type = Type::DOUBLE

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for i8

source§

const BYTE_LEN: u32 = 1u32

source§

const FIELD_TYPE: Type = Type::SBYTE

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for i16

source§

const BYTE_LEN: u32 = 2u32

source§

const FIELD_TYPE: Type = Type::SSHORT

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for i32

source§

const BYTE_LEN: u32 = 4u32

source§

const FIELD_TYPE: Type = Type::SLONG

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for str

source§

const BYTE_LEN: u32 = 1u32

source§

const FIELD_TYPE: Type = Type::ASCII

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for u8

source§

const BYTE_LEN: u32 = 1u32

source§

const FIELD_TYPE: Type = Type::BYTE

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for u16

source§

const BYTE_LEN: u32 = 2u32

source§

const FIELD_TYPE: Type = Type::SHORT

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for u32

source§

const BYTE_LEN: u32 = 4u32

source§

const FIELD_TYPE: Type = Type::LONG

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for u64

source§

const BYTE_LEN: u32 = 8u32

source§

const FIELD_TYPE: Type = Type::LONG8

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for [f32]

source§

const BYTE_LEN: u32 = 4u32

source§

const FIELD_TYPE: Type = Type::FLOAT

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for [f64]

source§

const BYTE_LEN: u32 = 8u32

source§

const FIELD_TYPE: Type = Type::DOUBLE

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for [i8]

source§

const BYTE_LEN: u32 = 1u32

source§

const FIELD_TYPE: Type = Type::SBYTE

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for [i16]

source§

const BYTE_LEN: u32 = 2u32

source§

const FIELD_TYPE: Type = Type::SSHORT

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for [i32]

source§

const BYTE_LEN: u32 = 4u32

source§

const FIELD_TYPE: Type = Type::SLONG

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for [u8]

source§

const BYTE_LEN: u32 = 1u32

source§

const FIELD_TYPE: Type = Type::BYTE

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for [u16]

source§

const BYTE_LEN: u32 = 2u32

source§

const FIELD_TYPE: Type = Type::SHORT

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for [u32]

source§

const BYTE_LEN: u32 = 4u32

source§

const FIELD_TYPE: Type = Type::LONG

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for [u64]

source§

const BYTE_LEN: u32 = 8u32

source§

const FIELD_TYPE: Type = Type::LONG8

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for [Rational]

source§

const BYTE_LEN: u32 = 8u32

source§

const FIELD_TYPE: Type = Type::RATIONAL

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl TiffValue for [SRational]

source§

const BYTE_LEN: u32 = 8u32

source§

const FIELD_TYPE: Type = Type::SRATIONAL

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

source§

impl<'a, T: TiffValue + ?Sized> TiffValue for &'a T

source§

const BYTE_LEN: u32 = T::BYTE_LEN

source§

const FIELD_TYPE: Type = T::FIELD_TYPE

source§

fn count(&self) -> u32

source§

fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>

Implementors§

source§

impl TiffValue for Rational

source§

const BYTE_LEN: u32 = 8u32

source§

const FIELD_TYPE: Type = Type::RATIONAL

source§

impl TiffValue for SRational

source§

const BYTE_LEN: u32 = 8u32

source§

const FIELD_TYPE: Type = Type::SRATIONAL