Span

Trait Span 

Source
pub trait Span:
    Clone
    + Send
    + Sync
    + 'static
    + Eq
    + PartialEq
    + Ord
    + PartialOrd
    + Debug
    + Hash
    + Display
    + Codec<Cfg = ()> { }
Expand description

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

Span is typically used to parse things like requests from an untrusted network connection (with variable-length fields). 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", so this trait is not object safe.

Implementors§

Source§

impl Span for commonware_utils::sequence::prefixed_u64::U64

Source§

impl Span for U32

Source§

impl Span for commonware_utils::sequence::u64::U64

Source§

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