Struct typed_bytes::ByteSlice
source · pub struct ByteSlice<'a, T> {
pub(crate) slice: &'a [u8],
pub(crate) phantom: PhantomData<T>,
}
Expand description
A typed slice of bytes
Fields§
§slice: &'a [u8]
§phantom: PhantomData<T>
Implementations§
Trait Implementations§
source§impl<'a, T: Ord> Ord for ByteSlice<'a, T>
impl<'a, T: Ord> Ord for ByteSlice<'a, T>
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, T: PartialEq> PartialEq<ByteSlice<'a, T>> for ByteSlice<'a, T>
impl<'a, T: PartialEq> PartialEq<ByteSlice<'a, T>> for ByteSlice<'a, T>
source§impl<'a, T: PartialOrd> PartialOrd<ByteSlice<'a, T>> for ByteSlice<'a, T>
impl<'a, T: PartialOrd> PartialOrd<ByteSlice<'a, T>> for ByteSlice<'a, T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<'a, T: Eq> Eq for ByteSlice<'a, T>
impl<'a, T> StructuralEq for ByteSlice<'a, T>
impl<'a, T> StructuralPartialEq for ByteSlice<'a, T>
Auto Trait Implementations§
impl<'a, T> RefUnwindSafe for ByteSlice<'a, T>where T: RefUnwindSafe,
impl<'a, T> Send for ByteSlice<'a, T>where T: Send,
impl<'a, T> Sync for ByteSlice<'a, T>where T: Sync,
impl<'a, T> Unpin for ByteSlice<'a, T>where T: Unpin,
impl<'a, T> UnwindSafe for ByteSlice<'a, T>where T: 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