[][src]Trait zerocopy::ByteSlice

pub unsafe trait ByteSlice: Deref<Target = [u8]> + Sized + Sealed {
    fn as_ptr(&self) -> *const u8;
fn split_at(self, mid: usize) -> (Self, Self); }

A mutable or immutable reference to a byte slice.

ByteSlice abstracts over the mutability of a byte slice reference, and is implemented for various special reference types such as Ref<[u8]> and RefMut<[u8]>.

Required methods

fn as_ptr(&self) -> *const u8

fn split_at(self, mid: usize) -> (Self, Self)

Loading content...

Implementations on Foreign Types

impl<'a> ByteSlice for Ref<'a, [u8]>[src]

impl<'a> ByteSlice for RefMut<'a, [u8]>[src]

Loading content...


impl<'a> ByteSlice for &'a [u8][src]

impl<'a> ByteSlice for &'a mut [u8][src]

Loading content...