pub enum ByteOrder {
LittleEndian,
BigEndian,
}Expand description
Byte order of a TIFF stream, named by the two-byte order mark at the start of the header.
Every scalar in the stream — IFD offsets, entry counts, and multi-byte values — is read and
written in this order. Unlike most binary image formats (which fix one endianness), TIFF
records its own, so a reader must thread the ByteOrder through every access.
Variants§
LittleEndian
Little-endian (II, 0x4949): least-significant byte first.
BigEndian
Big-endian (MM, 0x4D4D): most-significant byte first.
Implementations§
Source§impl ByteOrder
impl ByteOrder
Sourcepub fn u16(self, b: [u8; 2]) -> u16
pub fn u16(self, b: [u8; 2]) -> u16
Decodes a 16-bit unsigned integer from two bytes in this order.
Sourcepub fn u32(self, b: [u8; 4]) -> u32
pub fn u32(self, b: [u8; 4]) -> u32
Decodes a 32-bit unsigned integer from four bytes in this order.
Sourcepub fn u64(self, b: [u8; 8]) -> u64
pub fn u64(self, b: [u8; 8]) -> u64
Decodes a 64-bit unsigned integer from eight bytes in this order (BigTIFF offsets/counts).
Sourcepub fn pack_u16(self, v: u16) -> [u8; 2]
pub fn pack_u16(self, v: u16) -> [u8; 2]
Encodes a 16-bit unsigned integer to two bytes in this order.
Trait Implementations§
impl Copy for ByteOrder
impl Eq for ByteOrder
impl StructuralPartialEq for ByteOrder
Auto Trait Implementations§
impl Freeze for ByteOrder
impl RefUnwindSafe for ByteOrder
impl Send for ByteOrder
impl Sync for ByteOrder
impl Unpin for ByteOrder
impl UnsafeUnpin for ByteOrder
impl UnwindSafe for ByteOrder
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
Mutably borrows from an owned value. Read more