Trait amplify::RawArray

source ·
pub trait RawArray<const LEN: usize> {
    fn from_raw_array(val: impl Into<[u8; LEN]>) -> Self;
    fn to_raw_array(&self) -> [u8; LEN];
}
Expand description

Trait which does a blanket implementation for all types wrapping Arrays

Required Methods§

source

fn from_raw_array(val: impl Into<[u8; LEN]>) -> Self

Constructs a wrapper type around an array.

source

fn to_raw_array(&self) -> [u8; LEN]

Returns a raw array representation stored in the wrapped type.

Implementors§

source§

impl<Id, const LEN: usize> RawArray<LEN> for Idwhere
Id: Wrapper<Inner = Array<u8, LEN>>,