pub enum NibSlice<'a> {
Full(&'a NibSliceFull),
NoL(&'a NibSliceNoL),
NoR(&'a NibSliceNoR),
NoBoth(&'a NibSliceNoBoth),
}Expand description
Reference to a nibble slice.
Variants§
Full(&'a NibSliceFull)
A slice with both sides.
NoL(&'a NibSliceNoL)
A slice without the left side.
NoR(&'a NibSliceNoR)
A slice without the right side.
NoBoth(&'a NibSliceNoBoth)
A slice without both sides.
Implementations§
Source§impl<'a> NibSlice<'a>
impl<'a> NibSlice<'a>
Sourcepub fn as_aligned(&self) -> Option<NibSliceAligned<'a>>
pub fn as_aligned(&self) -> Option<NibSliceAligned<'a>>
Converts this slice into an aligned version.
Sourcepub fn as_unaligned(&self) -> Option<NibSliceUnaligned<'a>>
pub fn as_unaligned(&self) -> Option<NibSliceUnaligned<'a>>
Converts this slice into an unaligned version.
Sourcepub fn as_even(&self) -> Option<NibSliceEven<'a>>
pub fn as_even(&self) -> Option<NibSliceEven<'a>>
Converts this slice into an even version.
Sourcepub fn as_odd(&self) -> Option<NibSliceOdd<'a>>
pub fn as_odd(&self) -> Option<NibSliceOdd<'a>>
Converts this slice into an odd version.
Trait Implementations§
Source§impl<'a> From<&'a NibSliceFull> for NibSlice<'a>
impl<'a> From<&'a NibSliceFull> for NibSlice<'a>
Source§fn from(slice: &'a NibSliceFull) -> Self
fn from(slice: &'a NibSliceFull) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a NibSliceNoBoth> for NibSlice<'a>
impl<'a> From<&'a NibSliceNoBoth> for NibSlice<'a>
Source§fn from(slice: &'a NibSliceNoBoth) -> Self
fn from(slice: &'a NibSliceNoBoth) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a NibSliceNoL> for NibSlice<'a>
impl<'a> From<&'a NibSliceNoL> for NibSlice<'a>
Source§fn from(slice: &'a NibSliceNoL) -> Self
fn from(slice: &'a NibSliceNoL) -> Self
Converts to this type from the input type.
Source§impl<'a> From<&'a NibSliceNoR> for NibSlice<'a>
impl<'a> From<&'a NibSliceNoR> for NibSlice<'a>
Source§fn from(slice: &'a NibSliceNoR) -> Self
fn from(slice: &'a NibSliceNoR) -> Self
Converts to this type from the input type.
Source§impl<'a> From<NibSliceAligned<'a>> for NibSlice<'a>
impl<'a> From<NibSliceAligned<'a>> for NibSlice<'a>
Source§fn from(slice: NibSliceAligned<'a>) -> Self
fn from(slice: NibSliceAligned<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<NibSliceEven<'a>> for NibSlice<'a>
impl<'a> From<NibSliceEven<'a>> for NibSlice<'a>
Source§fn from(slice: NibSliceEven<'a>) -> Self
fn from(slice: NibSliceEven<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<NibSliceOdd<'a>> for NibSlice<'a>
impl<'a> From<NibSliceOdd<'a>> for NibSlice<'a>
Source§fn from(slice: NibSliceOdd<'a>) -> Self
fn from(slice: NibSliceOdd<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> From<NibSliceUnaligned<'a>> for NibSlice<'a>
impl<'a> From<NibSliceUnaligned<'a>> for NibSlice<'a>
Source§fn from(slice: NibSliceUnaligned<'a>) -> Self
fn from(slice: NibSliceUnaligned<'a>) -> Self
Converts to this type from the input type.
Source§impl<'a> NibSliceExt for NibSlice<'a>
impl<'a> NibSliceExt for NibSlice<'a>
Source§fn nibble_pairs(&self) -> NibblePairs<'_> ⓘ
fn nibble_pairs(&self) -> NibblePairs<'_> ⓘ
Iterator over the nibble pairs in this slice. Read more
Source§fn decompose(&self) -> (Option<&u4lo>, &[u4x2], Option<&u4hi>)
fn decompose(&self) -> (Option<&u4lo>, &[u4x2], Option<&u4hi>)
Decomposes this slice into its parts.
Source§fn into_generic(&self) -> NibSlice<'_>
fn into_generic(&self) -> NibSlice<'_>
Converts this slice into a
NibSlice.Source§fn is_aligned(&self) -> bool
fn is_aligned(&self) -> bool
Checks whether this slice is aligned to a byte boundary.
Source§impl<'a> Ord for NibSlice<'a>
impl<'a> Ord for NibSlice<'a>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<'a, Rhs: ?Sized + NibSliceExt> PartialOrd<Rhs> for NibSlice<'a>
impl<'a, Rhs: ?Sized + NibSliceExt> PartialOrd<Rhs> for NibSlice<'a>
impl<'a> Eq for NibSlice<'a>
Auto Trait Implementations§
impl<'a> Freeze for NibSlice<'a>
impl<'a> RefUnwindSafe for NibSlice<'a>
impl<'a> Send for NibSlice<'a>
impl<'a> Sync for NibSlice<'a>
impl<'a> Unpin for NibSlice<'a>
impl<'a> UnwindSafe for NibSlice<'a>
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