[−][src]Trait byte_slice_cast::FromByteSlice
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>
slice: &mut T
) -> Result<&mut [Self], Error>
Convert from an mutable byte slice to a mutable slice of a fundamental, built-in numeric type
Implementations on Foreign Types
impl FromByteSlice for u8
[src]
fn from_byte_slice<T: AsRef<[u8]> + ?Sized>(slice: &T) -> Result<&[u8], Error>
[src]
fn from_mut_byte_slice<T: AsMut<[u8]> + ?Sized>(
slice: &mut T
) -> Result<&mut [u8], Error>
[src]
slice: &mut T
) -> Result<&mut [u8], Error>
impl FromByteSlice for u16
[src]
fn from_byte_slice<T: AsRef<[u8]> + ?Sized>(slice: &T) -> Result<&[u16], Error>
[src]
fn from_mut_byte_slice<T: AsMut<[u8]> + ?Sized>(
slice: &mut T
) -> Result<&mut [u16], Error>
[src]
slice: &mut T
) -> Result<&mut [u16], Error>
impl FromByteSlice for u32
[src]
fn from_byte_slice<T: AsRef<[u8]> + ?Sized>(slice: &T) -> Result<&[u32], Error>
[src]
fn from_mut_byte_slice<T: AsMut<[u8]> + ?Sized>(
slice: &mut T
) -> Result<&mut [u32], Error>
[src]
slice: &mut T
) -> Result<&mut [u32], Error>
impl FromByteSlice for u64
[src]
fn from_byte_slice<T: AsRef<[u8]> + ?Sized>(slice: &T) -> Result<&[u64], Error>
[src]
fn from_mut_byte_slice<T: AsMut<[u8]> + ?Sized>(
slice: &mut T
) -> Result<&mut [u64], Error>
[src]
slice: &mut T
) -> Result<&mut [u64], Error>
impl FromByteSlice for u128
[src]
fn from_byte_slice<T: AsRef<[u8]> + ?Sized>(slice: &T) -> Result<&[u128], Error>
[src]
fn from_mut_byte_slice<T: AsMut<[u8]> + ?Sized>(
slice: &mut T
) -> Result<&mut [u128], Error>
[src]
slice: &mut T
) -> Result<&mut [u128], Error>
impl FromByteSlice for i8
[src]
fn from_byte_slice<T: AsRef<[u8]> + ?Sized>(slice: &T) -> Result<&[i8], Error>
[src]
fn from_mut_byte_slice<T: AsMut<[u8]> + ?Sized>(
slice: &mut T
) -> Result<&mut [i8], Error>
[src]
slice: &mut T
) -> Result<&mut [i8], Error>
impl FromByteSlice for i16
[src]
fn from_byte_slice<T: AsRef<[u8]> + ?Sized>(slice: &T) -> Result<&[i16], Error>
[src]
fn from_mut_byte_slice<T: AsMut<[u8]> + ?Sized>(
slice: &mut T
) -> Result<&mut [i16], Error>
[src]
slice: &mut T
) -> Result<&mut [i16], Error>
impl FromByteSlice for i32
[src]
fn from_byte_slice<T: AsRef<[u8]> + ?Sized>(slice: &T) -> Result<&[i32], Error>
[src]
fn from_mut_byte_slice<T: AsMut<[u8]> + ?Sized>(
slice: &mut T
) -> Result<&mut [i32], Error>
[src]
slice: &mut T
) -> Result<&mut [i32], Error>
impl FromByteSlice for i64
[src]
fn from_byte_slice<T: AsRef<[u8]> + ?Sized>(slice: &T) -> Result<&[i64], Error>
[src]
fn from_mut_byte_slice<T: AsMut<[u8]> + ?Sized>(
slice: &mut T
) -> Result<&mut [i64], Error>
[src]
slice: &mut T
) -> Result<&mut [i64], Error>
impl FromByteSlice for i128
[src]
fn from_byte_slice<T: AsRef<[u8]> + ?Sized>(slice: &T) -> Result<&[i128], Error>
[src]
fn from_mut_byte_slice<T: AsMut<[u8]> + ?Sized>(
slice: &mut T
) -> Result<&mut [i128], Error>
[src]
slice: &mut T
) -> Result<&mut [i128], Error>
impl FromByteSlice for f32
[src]
fn from_byte_slice<T: AsRef<[u8]> + ?Sized>(slice: &T) -> Result<&[f32], Error>
[src]
fn from_mut_byte_slice<T: AsMut<[u8]> + ?Sized>(
slice: &mut T
) -> Result<&mut [f32], Error>
[src]
slice: &mut T
) -> Result<&mut [f32], Error>
impl FromByteSlice for f64
[src]
fn from_byte_slice<T: AsRef<[u8]> + ?Sized>(slice: &T) -> Result<&[f64], Error>
[src]
fn from_mut_byte_slice<T: AsMut<[u8]> + ?Sized>(
slice: &mut T
) -> Result<&mut [f64], Error>
[src]
slice: &mut T
) -> Result<&mut [f64], Error>
impl FromByteSlice for usize
[src]
fn from_byte_slice<T: AsRef<[u8]> + ?Sized>(
slice: &T
) -> Result<&[usize], Error>
[src]
slice: &T
) -> Result<&[usize], Error>
fn from_mut_byte_slice<T: AsMut<[u8]> + ?Sized>(
slice: &mut T
) -> Result<&mut [usize], Error>
[src]
slice: &mut T
) -> Result<&mut [usize], Error>
impl FromByteSlice for isize
[src]
fn from_byte_slice<T: AsRef<[u8]> + ?Sized>(
slice: &T
) -> Result<&[isize], Error>
[src]
slice: &T
) -> Result<&[isize], Error>
fn from_mut_byte_slice<T: AsMut<[u8]> + ?Sized>(
slice: &mut T
) -> Result<&mut [isize], Error>
[src]
slice: &mut T
) -> Result<&mut [isize], Error>