pub union u4x2 {
/* private fields */
}Expand description
A u8 split into its component nibbles.
Implementations§
Source§impl u4x2
impl u4x2
Sourcepub fn swap_pairs(&mut self)
pub fn swap_pairs(&mut self)
Swaps the nibbles in the pair.
Sourcepub fn from_ascii_digits(lo: u8, hi: u8) -> Option<u4x2>
pub fn from_ascii_digits(lo: u8, hi: u8) -> Option<u4x2>
Converts an ASCII hex digit into a nibble.
Sourcepub fn to_lower_ascii_digits(&self) -> (u8, u8)
pub fn to_lower_ascii_digits(&self) -> (u8, u8)
Converts a nibble into a lowercase ASCII hex digit.
Sourcepub fn to_upper_ascii_digit(&self) -> (u8, u8)
pub fn to_upper_ascii_digit(&self) -> (u8, u8)
Converts a nibble into an uppercase ASCII hex digit.
Sourcepub fn to_lower_digits(&self) -> (char, char)
pub fn to_lower_digits(&self) -> (char, char)
Converts a nibble into a lowercase hex digit.
Sourcepub fn to_upper_digits(&self) -> (char, char)
pub fn to_upper_digits(&self) -> (char, char)
Converts a nibble into an uppercase hex digit.
Sourcepub fn to_padded_lower_hex(&self) -> ArrayString<[u8; 2]>
pub fn to_padded_lower_hex(&self) -> ArrayString<[u8; 2]>
Converts a nibble into a lowercase hex string.
Sourcepub fn to_padded_upper_hex(&self) -> ArrayString<[u8; 2]>
pub fn to_padded_upper_hex(&self) -> ArrayString<[u8; 2]>
Converts a nibble into an uppercase hex string.
Sourcepub fn to_padded_binary(&self) -> ArrayString<[u8; 8]>
pub fn to_padded_binary(&self) -> ArrayString<[u8; 8]>
Converts a nibble into a binary string.
Trait Implementations§
Source§impl<A: Array<Item = u4x2>> Extend<u4x2> for NibArrayVec<A>
impl<A: Array<Item = u4x2>> Extend<u4x2> for NibArrayVec<A>
Source§fn extend<I: IntoIterator<Item = u4x2>>(&mut self, iter: I)
fn extend<I: IntoIterator<Item = u4x2>>(&mut self, iter: I)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<A: Array<Item = u4x2>> FromIterator<u4x2> for NibArrayVec<A>
impl<A: Array<Item = u4x2>> FromIterator<u4x2> for NibArrayVec<A>
Source§impl Ord for u4x2
impl Ord for u4x2
Source§impl PartialOrd<u4x2> for u8
impl PartialOrd<u4x2> for u8
Source§impl PartialOrd<u8> for u4x2
impl PartialOrd<u8> for u4x2
Source§impl PartialOrd for u4x2
impl PartialOrd for u4x2
impl Copy for u4x2
impl Eq for u4x2
Auto Trait Implementations§
impl Freeze for u4x2
impl RefUnwindSafe for u4x2
impl Send for u4x2
impl Sync for u4x2
impl Unpin for u4x2
impl UnwindSafe for u4x2
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