Skip to main content

FromByteArray

Trait FromByteArray 

Source
pub trait FromByteArray: IntoByteArray {
    // Required method
    fn from_byte_array(byte_array: Self::ByteArray) -> Self;
}
Expand description

Infallible conversion from a fixed-size byte array back into a value.

This is the infallible counterpart to TryFromByteArray. Implement this when decoding cannot fail (i.e. every possible byte array is a valid value).

A blanket impl automatically provides TryFromByteArray for every type that implements FromByteArray.

Required Methods§

Source

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Deserialize a value from a fixed-size byte array. Infallible.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl FromByteArray for f32

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for f64

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for i8

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for i16

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for i32

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for i64

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for i128

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for u8

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for u16

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for u32

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for u64

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for u128

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for Ipv4Addr

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for Ipv6Addr

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for SocketAddrV4

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for SocketAddrV6

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for Range<i8>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for Range<i16>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for Range<i32>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for Range<i64>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for Range<i128>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for Range<u8>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for Range<u16>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for Range<u32>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for Range<u64>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for Range<u128>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeFrom<f32>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeFrom<f64>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeFrom<i8>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeFrom<i16>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeFrom<i32>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeFrom<i64>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeFrom<i128>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeFrom<u8>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeFrom<u16>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeFrom<u32>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeFrom<u64>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeFrom<u128>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeFull

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeInclusive<i8>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeInclusive<i16>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeInclusive<i32>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeInclusive<i64>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeInclusive<i128>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeInclusive<u8>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeInclusive<u16>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeInclusive<u32>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeInclusive<u64>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeInclusive<u128>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeTo<f32>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeTo<f64>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeTo<i8>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeTo<i16>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeTo<i32>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeTo<i64>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeTo<i128>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeTo<u8>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeTo<u16>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeTo<u32>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeTo<u64>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeTo<u128>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeToInclusive<f32>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeToInclusive<f64>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeToInclusive<i8>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeToInclusive<i16>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeToInclusive<i32>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeToInclusive<i64>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeToInclusive<i128>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeToInclusive<u8>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeToInclusive<u16>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeToInclusive<u32>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeToInclusive<u64>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for RangeToInclusive<u128>

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for Duration

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl FromByteArray for SystemTime

Source§

fn from_byte_array(byte_array: Self::ByteArray) -> Self

Source§

impl<T> FromByteArray for PhantomData<T>

Source§

fn from_byte_array(_: Self::ByteArray) -> Self

Implementors§

Source§

impl FromByteArray for BigEndian<f32>

Source§

impl FromByteArray for BigEndian<f64>

Source§

impl FromByteArray for BigEndian<i16>

Source§

impl FromByteArray for BigEndian<i32>

Source§

impl FromByteArray for BigEndian<i64>

Source§

impl FromByteArray for BigEndian<i128>

Source§

impl FromByteArray for BigEndian<u16>

Source§

impl FromByteArray for BigEndian<u32>

Source§

impl FromByteArray for BigEndian<u64>

Source§

impl FromByteArray for BigEndian<u128>

Source§

impl FromByteArray for LittleEndian<f32>

Source§

impl FromByteArray for LittleEndian<f64>

Source§

impl FromByteArray for LittleEndian<i16>

Source§

impl FromByteArray for LittleEndian<i32>

Source§

impl FromByteArray for LittleEndian<i64>

Source§

impl FromByteArray for LittleEndian<i128>

Source§

impl FromByteArray for LittleEndian<u16>

Source§

impl FromByteArray for LittleEndian<u32>

Source§

impl FromByteArray for LittleEndian<u64>

Source§

impl FromByteArray for LittleEndian<u128>