[][src]Trait byte_slice_cast::FromByteSlice

pub unsafe trait FromByteSlice where
    Self: Sized
{ fn from_byte_slice<T: AsRef<[u8]> + ?Sized>(
        slice: &T
    ) -> Result<&[Self], Error>;
fn from_mut_byte_slice<T: AsMut<[u8]> + ?Sized>(
        slice: &mut T
    ) -> Result<&mut [Self], Error>; }

Trait for converting from a byte slice to a slice of a fundamental, built-in numeric type.

This trait is an implementation detail. Use the AsSliceOf and AsMutSliceOf traits.

Required methods

fn from_byte_slice<T: AsRef<[u8]> + ?Sized>(slice: &T) -> Result<&[Self], Error>

Convert from an immutable byte slice to a immutable slice of a fundamental, built-in numeric type

fn from_mut_byte_slice<T: AsMut<[u8]> + ?Sized>(
    slice: &mut T
) -> Result<&mut [Self], Error>

Convert from an mutable byte slice to a mutable slice of a fundamental, built-in numeric type

Loading content...

Implementations on Foreign Types

impl FromByteSlice for u8[src]

impl FromByteSlice for u16[src]

impl FromByteSlice for u32[src]

impl FromByteSlice for u64[src]

impl FromByteSlice for u128[src]

impl FromByteSlice for i8[src]

impl FromByteSlice for i16[src]

impl FromByteSlice for i32[src]

impl FromByteSlice for i64[src]

impl FromByteSlice for i128[src]

impl FromByteSlice for f32[src]

impl FromByteSlice for f64[src]

impl FromByteSlice for usize[src]

impl FromByteSlice for isize[src]

Loading content...

Implementors

Loading content...