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.

Implementations on Foreign Types§

Source§

impl Span for i8

Source§

impl Span for i16

Source§

impl Span for i32

Source§

impl Span for i64

Source§

impl Span for i128

Source§

impl Span for u8

Source§

impl Span for u16

Source§

impl Span for u32

Source§

impl Span for u64

Source§

impl Span for u128

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 Span for Unit

Source§

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