[][src]Trait lazy_bytes_cast::slice::ByteSliceAsType

pub trait ByteSliceAsType {
    fn as_type<T: AsByteSlice>(&self) -> Option<&T>;
fn as_type_mut<T: AsByteSlice>(&mut self) -> Option<&mut T>; }

Trait, which implements accessing type as reference from byte slice.

This is safe as long as type implements AsByteSlice correctly.

Required methods

fn as_type<T: AsByteSlice>(&self) -> Option<&T>

Gets reference

fn as_type_mut<T: AsByteSlice>(&mut self) -> Option<&mut T>

Gets mutable reference

Loading content...

Implementors

impl ByteSliceAsType for [u8][src]

Loading content...