#[repr(u16)]pub enum FieldType {
Byte = 1,
Ascii = 2,
Short = 3,
Long = 4,
Long8 = 16,
Undefined = 7,
}Expand description
TIFF field types that determine how values are encoded.
Each field type has a specific size in bytes, which is critical for:
- Determining if a value fits inline in an IFD entry
- Reading arrays of values correctly
Note: We only define types actually used in WSI files. TIFF supports additional types (RATIONAL, FLOAT, etc.) that are not needed here.
Variants§
Byte = 1
Unsigned 8-bit integer (1 byte)
Ascii = 2
8-bit ASCII character (1 byte)
Short = 3
Unsigned 16-bit integer (2 bytes)
Long = 4
Unsigned 32-bit integer (4 bytes)
Long8 = 16
Unsigned 64-bit integer (8 bytes) - BigTIFF only
Undefined = 7
Undefined byte data (1 byte per element)
Implementations§
Source§impl FieldType
impl FieldType
Sourcepub const INLINE_THRESHOLD_TIFF: usize = 4usize
pub const INLINE_THRESHOLD_TIFF: usize = 4usize
Maximum bytes that can be stored inline in a classic TIFF IFD entry.
In classic TIFF, the value/offset field is 4 bytes.
Sourcepub const INLINE_THRESHOLD_BIGTIFF: usize = 8usize
pub const INLINE_THRESHOLD_BIGTIFF: usize = 8usize
Maximum bytes that can be stored inline in a BigTIFF IFD entry.
In BigTIFF, the value/offset field is 8 bytes.
Sourcepub const fn size_in_bytes(self) -> usize
pub const fn size_in_bytes(self) -> usize
Size of a single value of this type in bytes.
This is essential for:
- Calculating total array sizes
- Determining inline vs offset storage
Trait Implementations§
impl Copy for FieldType
impl Eq for FieldType
impl StructuralPartialEq for FieldType
Auto Trait Implementations§
impl Freeze for FieldType
impl RefUnwindSafe for FieldType
impl Send for FieldType
impl Sync for FieldType
impl Unpin for FieldType
impl UnwindSafe for FieldType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more