pub enum Endian {
Big,
Little,
}
Expand description
Defines the order of bytes in a multi-byte type.
Variants§
Implementations§
source§impl Endian
impl Endian
sourcepub fn from_utf16_bom_bytes(bom: [u8; 2]) -> BinResult<Self>
pub fn from_utf16_bom_bytes(bom: [u8; 2]) -> BinResult<Self>
Converts a byte array containing a UTF-16 byte order mark into an
Endian
value.
Errors
Returns an error if the input does not contain a byte order mark.
sourcepub fn into_utf16_bom_bytes(self) -> [u8; 2]
pub fn into_utf16_bom_bytes(self) -> [u8; 2]
Converts an Endian
value into an array containing a UTF-16
byte order mark.
Trait Implementations§
source§impl PartialEq for Endian
impl PartialEq for Endian
impl Copy for Endian
impl Eq for Endian
impl StructuralEq for Endian
impl StructuralPartialEq for Endian
Auto Trait Implementations§
impl RefUnwindSafe for Endian
impl Send for Endian
impl Sync for Endian
impl Unpin 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