pub trait Bytes {
    fn write_slice_at(
        &mut self,
        offset: usize,
        slice: impl AsRef<[u8]>
    ) -> usize; fn as_ref(&mut self) -> &[u8]Notable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]; fn as_mut(&mut self) -> &mut [u8]Notable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]; }

Required methods

Panics

This function may panic, if the data is slice &mut [u8], and has not enough capacity.

But If the data is vector Vec<u8>, then it may reserve extra capacity if necessary.

Implementations on Foreign Types

Implementors