pub struct TreeOrdBytes<'a>(pub &'a [u8]);Expand description
The generic [T] impl is not performant for [u8]. We can’t specialize the
[T] impl on stable, so this exists to compare bytes in chunks of bytes.
However, it seems this is only more performant for very long slices and deep
trees, you should benchmark to see if this is faster for your usecase.
Tuple Fields§
§0: &'a [u8]Trait Implementations§
Source§impl<'a> Debug for TreeOrdBytes<'a>
impl<'a> Debug for TreeOrdBytes<'a>
Source§impl<'a> Ord for TreeOrdBytes<'a>
impl<'a> Ord for TreeOrdBytes<'a>
Source§fn cmp(&self, other: &TreeOrdBytes<'a>) -> Ordering
fn cmp(&self, other: &TreeOrdBytes<'a>) -> Ordering
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> PartialEq for TreeOrdBytes<'a>
impl<'a> PartialEq for TreeOrdBytes<'a>
Source§impl<'a> PartialOrd for TreeOrdBytes<'a>
impl<'a> PartialOrd for TreeOrdBytes<'a>
Source§impl<'a> TreeOrd for TreeOrdBytes<'a>
impl<'a> TreeOrd for TreeOrdBytes<'a>
impl<'a> Eq for TreeOrdBytes<'a>
impl<'a> StructuralPartialEq for TreeOrdBytes<'a>
Auto Trait Implementations§
impl<'a> Freeze for TreeOrdBytes<'a>
impl<'a> RefUnwindSafe for TreeOrdBytes<'a>
impl<'a> Send for TreeOrdBytes<'a>
impl<'a> Sync for TreeOrdBytes<'a>
impl<'a> Unpin for TreeOrdBytes<'a>
impl<'a> UnwindSafe for TreeOrdBytes<'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