Trait amplify::RawArray

source ·
pub trait RawArray<const LEN: usize>: Sized {
    // Required methods
    fn from_raw_array(val: impl Into<[u8; LEN]>) -> Self;
    fn to_raw_array(&self) -> [u8; LEN];
}
👎Deprecated since 4.2.0: use ByteArray instead
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

👎Deprecated since 4.2.0: use ByteArray instead

Constructs a wrapper type around an array.

source

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

👎Deprecated since 4.2.0: use ByteArray instead

Returns a raw array representation stored in the wrapped type.

Object Safety§

This trait is not object safe.

Implementors§

source§

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