Trait Array

Source
pub trait Array:
    Clone
    + Send
    + Sync
    + 'static
    + Eq
    + PartialEq
    + Ord
    + PartialOrd
    + Debug
    + Hash
    + Display
    + AsRef<[u8]>
    + Deref<Target = [u8]>
    + Decode<Cfg = ()>
    + EncodeFixed { }
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).

If a byte sequencer is not properly formatted, TryFrom must return an error.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl Array for commonware_utils::array::prefixed_u64::U64

Source§

impl Array for commonware_utils::array::u64::U64

Source§

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