pub unsafe trait ToByteSlicewhere
    Self: Sized,{
    // Required method
    fn to_byte_slice<T: AsRef<[Self]> + ?Sized>(slice: &T) -> &[u8] ;
}
Expand description

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

This trait is an implementation detail. Use the AsByteSlice trait.

Required Methods§

source

fn to_byte_slice<T: AsRef<[Self]> + ?Sized>(slice: &T) -> &[u8]

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

Implementations on Foreign Types§

source§

impl<const N: usize> ToByteSlice for [isize; N]

source§

fn to_byte_slice<T: AsRef<[[isize; N]]> + ?Sized>(slice: &T) -> &[u8]

source§

impl ToByteSlice for f64

source§

fn to_byte_slice<T: AsRef<[f64]> + ?Sized>(slice: &T) -> &[u8]

source§

impl<const N: usize> ToByteSlice for [f64; N]

source§

fn to_byte_slice<T: AsRef<[[f64; N]]> + ?Sized>(slice: &T) -> &[u8]

source§

impl ToByteSlice for i8

source§

fn to_byte_slice<T: AsRef<[i8]> + ?Sized>(slice: &T) -> &[u8]

source§

impl<const N: usize> ToByteSlice for [u64; N]

source§

fn to_byte_slice<T: AsRef<[[u64; N]]> + ?Sized>(slice: &T) -> &[u8]

source§

impl ToByteSlice for i128

source§

fn to_byte_slice<T: AsRef<[i128]> + ?Sized>(slice: &T) -> &[u8]

source§

impl<const N: usize> ToByteSlice for [u8; N]

source§

fn to_byte_slice<T: AsRef<[[u8; N]]> + ?Sized>(slice: &T) -> &[u8]

source§

impl<const N: usize> ToByteSlice for [u128; N]

source§

fn to_byte_slice<T: AsRef<[[u128; N]]> + ?Sized>(slice: &T) -> &[u8]

source§

impl<const N: usize> ToByteSlice for [u16; N]

source§

fn to_byte_slice<T: AsRef<[[u16; N]]> + ?Sized>(slice: &T) -> &[u8]

source§

impl ToByteSlice for isize

source§

fn to_byte_slice<T: AsRef<[isize]> + ?Sized>(slice: &T) -> &[u8]

source§

impl<const N: usize> ToByteSlice for [i8; N]

source§

fn to_byte_slice<T: AsRef<[[i8; N]]> + ?Sized>(slice: &T) -> &[u8]

source§

impl<const N: usize> ToByteSlice for [i16; N]

source§

fn to_byte_slice<T: AsRef<[[i16; N]]> + ?Sized>(slice: &T) -> &[u8]

source§

impl<const N: usize> ToByteSlice for [f32; N]

source§

fn to_byte_slice<T: AsRef<[[f32; N]]> + ?Sized>(slice: &T) -> &[u8]

source§

impl ToByteSlice for i16

source§

fn to_byte_slice<T: AsRef<[i16]> + ?Sized>(slice: &T) -> &[u8]

source§

impl ToByteSlice for u64

source§

fn to_byte_slice<T: AsRef<[u64]> + ?Sized>(slice: &T) -> &[u8]

source§

impl<const N: usize> ToByteSlice for [i32; N]

source§

fn to_byte_slice<T: AsRef<[[i32; N]]> + ?Sized>(slice: &T) -> &[u8]

source§

impl ToByteSlice for u16

source§

fn to_byte_slice<T: AsRef<[u16]> + ?Sized>(slice: &T) -> &[u8]

source§

impl ToByteSlice for ()

source§

fn to_byte_slice<T: AsRef<[()]> + ?Sized>(_: &T) -> &[u8]

source§

impl ToByteSlice for i64

source§

fn to_byte_slice<T: AsRef<[i64]> + ?Sized>(slice: &T) -> &[u8]

source§

impl<const N: usize> ToByteSlice for [u32; N]

source§

fn to_byte_slice<T: AsRef<[[u32; N]]> + ?Sized>(slice: &T) -> &[u8]

source§

impl<const N: usize> ToByteSlice for [i128; N]

source§

fn to_byte_slice<T: AsRef<[[i128; N]]> + ?Sized>(slice: &T) -> &[u8]

source§

impl ToByteSlice for u32

source§

fn to_byte_slice<T: AsRef<[u32]> + ?Sized>(slice: &T) -> &[u8]

source§

impl<const N: usize> ToByteSlice for [usize; N]

source§

fn to_byte_slice<T: AsRef<[[usize; N]]> + ?Sized>(slice: &T) -> &[u8]

source§

impl ToByteSlice for usize

source§

fn to_byte_slice<T: AsRef<[usize]> + ?Sized>(slice: &T) -> &[u8]

source§

impl ToByteSlice for i32

source§

fn to_byte_slice<T: AsRef<[i32]> + ?Sized>(slice: &T) -> &[u8]

source§

impl ToByteSlice for f32

source§

fn to_byte_slice<T: AsRef<[f32]> + ?Sized>(slice: &T) -> &[u8]

source§

impl ToByteSlice for u128

source§

fn to_byte_slice<T: AsRef<[u128]> + ?Sized>(slice: &T) -> &[u8]

source§

impl<const N: usize> ToByteSlice for [i64; N]

source§

fn to_byte_slice<T: AsRef<[[i64; N]]> + ?Sized>(slice: &T) -> &[u8]

source§

impl ToByteSlice for u8

source§

fn to_byte_slice<T: AsRef<[u8]> + ?Sized>(slice: &T) -> &[u8]

Implementors§