ReadSlice

Type Alias ReadSlice 

Source
pub type ReadSlice<'a> = ReadBuf<&'a mut [MaybeUninit<u8>]>;
Expand description

A ReadBuf that takes it’s buffer from an existing slice

Aliased Type§

pub struct ReadSlice<'a> { /* private fields */ }

Trait Implementations§

Source§

impl<'a> From<&'a mut [MaybeUninit<u8>]> for ReadSlice<'a>

Create a ReadBuf from an uninitialised slice of bytes. Will begin with 0 filled bytes.

Source§

fn from(buf: &'a mut [MaybeUninit<u8>]) -> Self

Converts to this type from the input type.
Source§

impl<'a> From<&'a mut [u8]> for ReadSlice<'a>

Create a ReadBuf from an initialised slice of bytes. Will begin with 0 filled bytes.

Source§

fn from(buf: &'a mut [u8]) -> Self

Converts to this type from the input type.