Struct LittleEndian
#[repr(transparent)]
pub struct LittleEndian<T>(/* private field */);
Little endian byte order.
Least significant byte first.
Implementations
impl LittleEndian<i128>
const fn to_bytes(self) -> [u8; 16]Return the memory representation of this type as a byte array in its endian byte order. Note: This is just a transmute.
const fn from_bytes(bytes: [u8; 16]) -> LittleEndian<i128>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl LittleEndian<i16>
const fn to_bytes(self) -> [u8; 2]Return the memory representation of this type as a byte array in its endian byte order. Note: This is just a transmute.
const fn from_bytes(bytes: [u8; 2]) -> LittleEndian<i16>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl LittleEndian<i32>
const fn to_bytes(self) -> [u8; 4]Return the memory representation of this type as a byte array in its endian byte order. Note: This is just a transmute.
const fn from_bytes(bytes: [u8; 4]) -> LittleEndian<i32>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl LittleEndian<i64>
const fn to_bytes(self) -> [u8; 8]Return the memory representation of this type as a byte array in its endian byte order. Note: This is just a transmute.
const fn from_bytes(bytes: [u8; 8]) -> LittleEndian<i64>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl LittleEndian<isize>
const fn to_bytes(self) -> [u8; 8]Return the memory representation of this type as a byte array in its endian byte order. Note: This is just a transmute.
const fn from_bytes(bytes: [u8; 8]) -> LittleEndian<isize>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl LittleEndian<u128>
const fn to_bytes(self) -> [u8; 16]Return the memory representation of this type as a byte array in its endian byte order. Note: This is just a transmute.
const fn from_bytes(bytes: [u8; 16]) -> LittleEndian<u128>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl LittleEndian<u16>
const fn to_bytes(self) -> [u8; 2]Return the memory representation of this type as a byte array in its endian byte order. Note: This is just a transmute.
const fn from_bytes(bytes: [u8; 2]) -> LittleEndian<u16>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl LittleEndian<u32>
const fn to_bytes(self) -> [u8; 4]Return the memory representation of this type as a byte array in its endian byte order. Note: This is just a transmute.
const fn from_bytes(bytes: [u8; 4]) -> LittleEndian<u32>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl LittleEndian<u64>
const fn to_bytes(self) -> [u8; 8]Return the memory representation of this type as a byte array in its endian byte order. Note: This is just a transmute.
const fn from_bytes(bytes: [u8; 8]) -> LittleEndian<u64>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl LittleEndian<usize>
const fn to_bytes(self) -> [u8; 8]Return the memory representation of this type as a byte array in its endian byte order. Note: This is just a transmute.
const fn from_bytes(bytes: [u8; 8]) -> LittleEndian<usize>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl<T> LittleEndian<T>
where
T: Sized + Copy,
const unsafe fn from_byte_slice(bytes: &[u8]) -> LittleEndian<T>fn as_byte_slice(&self) -> &[u8]fn as_byte_slice_mut(&mut self) -> &mut [u8]
Trait Implementations
impl From<BigEndian<i128>> for LittleEndian<i128>
fn from(data: BigEndian<i128>) -> Self
impl From<BigEndian<i16>> for LittleEndian<i16>
fn from(data: BigEndian<i16>) -> Self
impl From<BigEndian<i32>> for LittleEndian<i32>
fn from(data: BigEndian<i32>) -> Self
impl From<BigEndian<i64>> for LittleEndian<i64>
fn from(data: BigEndian<i64>) -> Self
impl From<BigEndian<isize>> for LittleEndian<isize>
fn from(data: BigEndian<isize>) -> Self
impl From<BigEndian<u128>> for LittleEndian<u128>
fn from(data: BigEndian<u128>) -> Self
impl From<BigEndian<u16>> for LittleEndian<u16>
fn from(data: BigEndian<u16>) -> Self
impl From<BigEndian<u32>> for LittleEndian<u32>
fn from(data: BigEndian<u32>) -> Self
impl From<BigEndian<u64>> for LittleEndian<u64>
fn from(data: BigEndian<u64>) -> Self
impl From<BigEndian<usize>> for LittleEndian<usize>
fn from(data: BigEndian<usize>) -> Self
impl From<i128> for LittleEndian<i128>
fn from(data: i128) -> Self
impl From<i16> for LittleEndian<i16>
fn from(data: i16) -> Self
impl From<i32> for LittleEndian<i32>
fn from(data: i32) -> Self
impl From<i64> for LittleEndian<i64>
fn from(data: i64) -> Self
impl From<isize> for LittleEndian<isize>
fn from(data: isize) -> Self
impl From<u128> for LittleEndian<u128>
fn from(data: u128) -> Self
impl From<u16> for LittleEndian<u16>
fn from(data: u16) -> Self
impl From<u32> for LittleEndian<u32>
fn from(data: u32) -> Self
impl From<u64> for LittleEndian<u64>
fn from(data: u64) -> Self
impl From<usize> for LittleEndian<usize>
fn from(data: usize) -> Self
impl<T> BitAnd for LittleEndian<T>
where
T: BitAnd,
type Output = LittleEndian<<T as BitAnd>::Output>;fn bitand(self, other: Self) -> Self::Output
impl<T> BitOr for LittleEndian<T>
where
T: BitOr,
type Output = LittleEndian<<T as BitOr>::Output>;fn bitor(self, other: Self) -> Self::Output
impl<T> BitXor for LittleEndian<T>
where
T: BitXor,
type Output = LittleEndian<<T as BitXor>::Output>;fn bitxor(self, other: Self) -> Self::Output
impl<T> Endian<T> for LittleEndian<T>
impl<T: Clone> Clone for LittleEndian<T>
fn clone(&self) -> Self
impl<T: Copy> Copy for LittleEndian<T>
impl<T: Debug> Debug for LittleEndian<T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<T: Eq> Eq for LittleEndian<T>
impl<T: Hash> Hash for LittleEndian<T>
fn hash<__H: Hasher>(&self, state: &mut __H)
impl<T: Ord> Ord for LittleEndian<T>
fn cmp(&self, other: &Self) -> Ordering
impl<T: PartialEq> PartialEq for LittleEndian<T>
fn eq(&self, other: &Self) -> bool
impl<T: PartialEq> StructuralPartialEq for LittleEndian<T>
impl<T: PartialOrd> PartialOrd for LittleEndian<T>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
Auto Trait Implementations
impl<T> Freeze for LittleEndian<T>
where
T: Freeze,
impl<T> RefUnwindSafe for LittleEndian<T>
where
T: RefUnwindSafe,
impl<T> Send for LittleEndian<T>
where
T: Send,
impl<T> Sync for LittleEndian<T>
where
T: Sync,
impl<T> Unpin for LittleEndian<T>
where
T: Unpin,
impl<T> UnsafeUnpin for LittleEndian<T>
where
T: UnsafeUnpin,
impl<T> UnwindSafe for LittleEndian<T>
where
T: UnwindSafe,
Blanket Implementations
impl<T> Any for LittleEndian<T>
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for LittleEndian<T>
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for LittleEndian<T>
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for LittleEndian<T>
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for LittleEndian<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T, U> Into<U> for LittleEndian<T>
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for LittleEndian<T>
where
U: Into<T>,
type Error = never;fn try_from(value: U) -> Result<T, never>
impl<T, U> TryInto<U> for LittleEndian<T>
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>