pub struct Bytes<const N: usize> { /* private fields */ }Expand description
A fixed-capacity, stack-allocated bytes buffer of capacity N.
Use Self::as_ref to get the bytes as a &[u8] and Self::as_mut to get the bytes as a &mut [u8].
Comparing Bytes is a constant-time operation.
Implementations§
Trait Implementations§
impl<const N: usize> Eq for Bytes<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for Bytes<N>
impl<const N: usize> RefUnwindSafe for Bytes<N>
impl<const N: usize> Send for Bytes<N>
impl<const N: usize> Sync for Bytes<N>
impl<const N: usize> Unpin for Bytes<N>
impl<const N: usize> UnsafeUnpin for Bytes<N>
impl<const N: usize> UnwindSafe for Bytes<N>
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