[][src]Trait lazy_bytes_cast::slice::FromByteSlice

pub trait FromByteSlice: FromByteArray + Sized {
    fn from_slice(slice: &[u8]) -> Option<Self> { ... }
unsafe fn from_slice_unchecked(slice: &[u8]) -> Self { ... } }

Describes a way to read byte slice into particular type.

Provided methods

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

Converts slice into Self only if mem::size_of::<Self>() == slice.len()

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

Converts slice into Self without performing any checks.

Loading content...

Implementors

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

Loading content...