pub struct ToBE<N>(PhantomData<N>);
Expand description
This struct represents a conversion of unsigned integers to the big endian format, so that the natural ordering of the numbers matches the lexicographic ordering of the bytes.
Tuple Fields§
§0: PhantomData<N>
Trait Implementations§
source§impl BytesMapping for ToBE<NonZeroU128>
impl BytesMapping for ToBE<NonZeroU128>
§type Domain = NonZeroU128
type Domain = NonZeroU128
The unconverted type that has a specific ordering
§type Bytes = [u8; 16]
type Bytes = [u8; 16]
The bytestring type that the
Self::Domain
is converted to.source§fn to_bytes(value: Self::Domain) -> Self::Bytes
fn to_bytes(value: Self::Domain) -> Self::Bytes
Convert the domain type into the bytestring type
source§fn from_bytes(bytes: Self::Bytes) -> Self::Domain
fn from_bytes(bytes: Self::Bytes) -> Self::Domain
Convert the bytestring type back into the domain type
source§impl BytesMapping for ToBE<NonZeroU16>
impl BytesMapping for ToBE<NonZeroU16>
§type Domain = NonZeroU16
type Domain = NonZeroU16
The unconverted type that has a specific ordering
§type Bytes = [u8; 2]
type Bytes = [u8; 2]
The bytestring type that the
Self::Domain
is converted to.source§fn to_bytes(value: Self::Domain) -> Self::Bytes
fn to_bytes(value: Self::Domain) -> Self::Bytes
Convert the domain type into the bytestring type
source§fn from_bytes(bytes: Self::Bytes) -> Self::Domain
fn from_bytes(bytes: Self::Bytes) -> Self::Domain
Convert the bytestring type back into the domain type
source§impl BytesMapping for ToBE<NonZeroU32>
impl BytesMapping for ToBE<NonZeroU32>
§type Domain = NonZeroU32
type Domain = NonZeroU32
The unconverted type that has a specific ordering
§type Bytes = [u8; 4]
type Bytes = [u8; 4]
The bytestring type that the
Self::Domain
is converted to.source§fn to_bytes(value: Self::Domain) -> Self::Bytes
fn to_bytes(value: Self::Domain) -> Self::Bytes
Convert the domain type into the bytestring type
source§fn from_bytes(bytes: Self::Bytes) -> Self::Domain
fn from_bytes(bytes: Self::Bytes) -> Self::Domain
Convert the bytestring type back into the domain type
source§impl BytesMapping for ToBE<NonZeroU64>
impl BytesMapping for ToBE<NonZeroU64>
§type Domain = NonZeroU64
type Domain = NonZeroU64
The unconverted type that has a specific ordering
§type Bytes = [u8; 8]
type Bytes = [u8; 8]
The bytestring type that the
Self::Domain
is converted to.source§fn to_bytes(value: Self::Domain) -> Self::Bytes
fn to_bytes(value: Self::Domain) -> Self::Bytes
Convert the domain type into the bytestring type
source§fn from_bytes(bytes: Self::Bytes) -> Self::Domain
fn from_bytes(bytes: Self::Bytes) -> Self::Domain
Convert the bytestring type back into the domain type
source§impl BytesMapping for ToBE<NonZeroU8>
impl BytesMapping for ToBE<NonZeroU8>
source§impl BytesMapping for ToBE<NonZeroUsize>
impl BytesMapping for ToBE<NonZeroUsize>
§type Domain = NonZeroUsize
type Domain = NonZeroUsize
The unconverted type that has a specific ordering
§type Bytes = [u8; 8]
type Bytes = [u8; 8]
The bytestring type that the
Self::Domain
is converted to.source§fn to_bytes(value: Self::Domain) -> Self::Bytes
fn to_bytes(value: Self::Domain) -> Self::Bytes
Convert the domain type into the bytestring type
source§fn from_bytes(bytes: Self::Bytes) -> Self::Domain
fn from_bytes(bytes: Self::Bytes) -> Self::Domain
Convert the bytestring type back into the domain type
source§impl BytesMapping for ToBE<u128>
impl BytesMapping for ToBE<u128>
source§impl BytesMapping for ToBE<u16>
impl BytesMapping for ToBE<u16>
source§impl BytesMapping for ToBE<u32>
impl BytesMapping for ToBE<u32>
source§impl BytesMapping for ToBE<u64>
impl BytesMapping for ToBE<u64>
source§impl BytesMapping for ToBE<u8>
impl BytesMapping for ToBE<u8>
source§impl BytesMapping for ToBE<usize>
impl BytesMapping for ToBE<usize>
Auto Trait Implementations§
impl<N> RefUnwindSafe for ToBE<N>where N: RefUnwindSafe,
impl<N> Send for ToBE<N>where N: Send,
impl<N> Sync for ToBE<N>where N: Sync,
impl<N> Unpin for ToBE<N>where N: Unpin,
impl<N> UnwindSafe for ToBE<N>where N: UnwindSafe,
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