pub trait TiffValue {
const BYTE_LEN: u8;
const FIELD_TYPE: Type;
// Required methods
fn count(&self) -> usize;
fn data(&self) -> Cow<'_, [u8]>;
// Provided methods
fn bytes(&self) -> usize { ... }
fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()> { ... }
}
Expand description
Trait for types that can be encoded in a tiff file
Required Associated Constants§
Required Methods§
Provided Methods§
fn bytes(&self) -> usize
sourcefn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>
fn write<W: Write>(&self, writer: &mut TiffWriter<W>) -> TiffResult<()>
Write this value to a TiffWriter.
While the default implementation will work in all cases, it may require unnecessary allocations.
The written bytes of any custom implementation MUST be the same as yielded by self.data()
.
Object Safety§
This trait is not object safe.