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§
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 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)