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§
Sourcefn from_byte_array(byte_array: Self::ByteArray) -> Self
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.