Skip to main content

BeByteArray

Trait BeByteArray 

Source
pub trait BeByteArray:
    Copy
    + AsRef<[u8]>
    + AnyBitPattern
    + Zeroable {
    // Required method
    fn from_slice(slice: &[u8]) -> Option<Self>;
}

Required Methods§

Source

fn from_slice(slice: &[u8]) -> Option<Self>

Must always succeed for [u8; N] if slice.len() == N, must fail otherwise

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

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

Source§

fn from_slice(slice: &[u8]) -> Option<Self>

Implementors§