[][src]Trait lazy_bytes_cast::slice::AsByteSlice

pub unsafe trait AsByteSlice: Sized {
    fn as_slice(&self) -> &[u8] { ... }
fn as_slice_mut(&mut self) -> &mut [u8] { ... } }

Trait which should be implemented for types that are safe to treat as byte

While it is possible to consider all types as bytes, it doesn't make sense for some (e.g. Vec)

Provided methods

fn as_slice(&self) -> &[u8]

Access value as slice of bytes

fn as_slice_mut(&mut self) -> &mut [u8]

Access value as mutable slice of bytes

Loading content...

Implementors

impl AsByteSlice for f32[src]

impl AsByteSlice for f64[src]

impl AsByteSlice for i8[src]

impl AsByteSlice for i16[src]

impl AsByteSlice for i32[src]

impl AsByteSlice for i64[src]

impl AsByteSlice for i128[src]

impl AsByteSlice for isize[src]

impl AsByteSlice for u8[src]

impl AsByteSlice for u16[src]

impl AsByteSlice for u32[src]

impl AsByteSlice for u64[src]

impl AsByteSlice for u128[src]

impl AsByteSlice for usize[src]

Loading content...