pub enum Endian {
Little,
Big,
}Expand description
On-disk byte order, resolved from the superblock magic.
Variants§
Little
Least-significant byte first (x86, most modern hosts).
Big
Most-significant byte first (SPARC, historic big-endian hosts).
Implementations§
Source§impl Endian
impl Endian
Sourcepub fn u16(self, data: &[u8], off: usize) -> u16
pub fn u16(self, data: &[u8], off: usize) -> u16
Read a u16 at off in this byte order, or 0 if out of range.
Sourcepub fn u32(self, data: &[u8], off: usize) -> u32
pub fn u32(self, data: &[u8], off: usize) -> u32
Read a u32 at off in this byte order, or 0 if out of range.
Sourcepub fn i32(self, data: &[u8], off: usize) -> i32
pub fn i32(self, data: &[u8], off: usize) -> i32
Read an i32 at off in this byte order, or 0 if out of range.
Trait Implementations§
impl Copy for Endian
impl Eq for Endian
impl StructuralPartialEq for Endian
Auto Trait Implementations§
impl Freeze for Endian
impl RefUnwindSafe for Endian
impl Send for Endian
impl Sync for Endian
impl Unpin for Endian
impl UnsafeUnpin for Endian
impl UnwindSafe for Endian
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