[][src]Trait lazy_bytes_cast::slice::ReadByteSlice

pub trait ReadByteSlice: FromByteArray + Sized {
    fn read_byte_slice(slice: &mut &[u8]) -> Option<Self> { ... }
unsafe fn read_byte_slice_unchecked(slice: &mut &[u8]) -> Self { ... } }

Describes a way to read byte slice into particular type.

Provided methods

fn read_byte_slice(slice: &mut &[u8]) -> Option<Self>

Reads from byte slice, converting consumed bytes into Self

Modifying existing slice by taking away required bytes.

When slice has insufficient size, returns None

unsafe fn read_byte_slice_unchecked(slice: &mut &[u8]) -> Self

Unsafe version of read_byte_slice, that doesn't perform length check.

Loading content...

Implementors

impl<T: FromByteArray> ReadByteSlice for T[src]

Loading content...