Skip to main content

RawArray

Trait 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.

Dyn Compatibilityยง

This trait is not dyn compatible.

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

Implementorsยง

Sourceยง

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