Skip to main content

Array

Trait Array 

Source
pub trait Array:
    Span
    + EncodeFixed
    + AsRef<[u8]>
    + Deref<Target = [u8]> { }
Expand description

Types that can be fallibly read from a fixed-size byte sequence.

Array is typically used to parse things like PublicKeys and Signatures from an untrusted network connection. Once parsed, these types are assumed to be well-formed (which prevents duplicate validation).

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl Array for commonware_utils::sequence::prefixed_u64::U64

Source§

impl Array for U32

Source§

impl Array for commonware_utils::sequence::u64::U64

Source§

impl Array for Unit

Source§

impl<const N: usize> Array for FixedBytes<N>