Struct BigEndian
#[repr(transparent)]
pub struct BigEndian<T>(/* private field */);
Big endian byte order.
Most significant byte first.
Implementations
impl BigEndian<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]) -> BigEndian<i128>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl BigEndian<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]) -> BigEndian<i16>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl BigEndian<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]) -> BigEndian<i32>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl BigEndian<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]) -> BigEndian<i64>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl BigEndian<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]) -> BigEndian<isize>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl BigEndian<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]) -> BigEndian<u128>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl BigEndian<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]) -> BigEndian<u16>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl BigEndian<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]) -> BigEndian<u32>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl BigEndian<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]) -> BigEndian<u64>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl BigEndian<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]) -> BigEndian<usize>Construct a value from its memory representation as a byte array. Note: This is just a transmute.
impl<T> BigEndian<T>
where
T: Sized + Copy,
const unsafe fn from_byte_slice(bytes: &[u8]) -> BigEndian<T>fn as_byte_slice(&self) -> &[u8]fn as_byte_slice_mut(&mut self) -> &mut [u8]
Trait Implementations
impl From<LittleEndian<i128>> for BigEndian<i128>
fn from(data: LittleEndian<i128>) -> Self
impl From<LittleEndian<i16>> for BigEndian<i16>
fn from(data: LittleEndian<i16>) -> Self
impl From<LittleEndian<i32>> for BigEndian<i32>
fn from(data: LittleEndian<i32>) -> Self
impl From<LittleEndian<i64>> for BigEndian<i64>
fn from(data: LittleEndian<i64>) -> Self
impl From<LittleEndian<isize>> for BigEndian<isize>
fn from(data: LittleEndian<isize>) -> Self
impl From<LittleEndian<u128>> for BigEndian<u128>
fn from(data: LittleEndian<u128>) -> Self
impl From<LittleEndian<u16>> for BigEndian<u16>
fn from(data: LittleEndian<u16>) -> Self
impl From<LittleEndian<u32>> for BigEndian<u32>
fn from(data: LittleEndian<u32>) -> Self
impl From<LittleEndian<u64>> for BigEndian<u64>
fn from(data: LittleEndian<u64>) -> Self
impl From<LittleEndian<usize>> for BigEndian<usize>
fn from(data: LittleEndian<usize>) -> Self
impl From<i128> for BigEndian<i128>
fn from(data: i128) -> Self
impl From<i16> for BigEndian<i16>
fn from(data: i16) -> Self
impl From<i32> for BigEndian<i32>
fn from(data: i32) -> Self
impl From<i64> for BigEndian<i64>
fn from(data: i64) -> Self
impl From<isize> for BigEndian<isize>
fn from(data: isize) -> Self
impl From<u128> for BigEndian<u128>
fn from(data: u128) -> Self
impl From<u16> for BigEndian<u16>
fn from(data: u16) -> Self
impl From<u32> for BigEndian<u32>
fn from(data: u32) -> Self
impl From<u64> for BigEndian<u64>
fn from(data: u64) -> Self
impl From<usize> for BigEndian<usize>
fn from(data: usize) -> Self
impl<T> BitAnd for BigEndian<T>
where
T: BitAnd,
type Output = BigEndian<<T as BitAnd>::Output>;fn bitand(self, other: Self) -> Self::Output
impl<T> BitOr for BigEndian<T>
where
T: BitOr,
type Output = BigEndian<<T as BitOr>::Output>;fn bitor(self, other: Self) -> Self::Output
impl<T> BitXor for BigEndian<T>
where
T: BitXor,
type Output = BigEndian<<T as BitXor>::Output>;fn bitxor(self, other: Self) -> Self::Output
impl<T> Endian<T> for BigEndian<T>
impl<T: Clone> Clone for BigEndian<T>
fn clone(&self) -> Self
impl<T: Copy> Copy for BigEndian<T>
impl<T: Debug> Debug for BigEndian<T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<T: Eq> Eq for BigEndian<T>
impl<T: Hash> Hash for BigEndian<T>
fn hash<__H: Hasher>(&self, state: &mut __H)
impl<T: Ord> Ord for BigEndian<T>
fn cmp(&self, other: &Self) -> Ordering
impl<T: PartialEq> PartialEq for BigEndian<T>
fn eq(&self, other: &Self) -> bool
impl<T: PartialEq> StructuralPartialEq for BigEndian<T>
impl<T: PartialOrd> PartialOrd for BigEndian<T>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>