Trait Decodable

Source
pub trait Decodable {
    // Required method
    fn decode<Producer>(
        producer: &mut Producer,
    ) -> impl Future<Output = Result<Self, DecodeError<Producer::Error>>>
       where Producer: BulkProducer<Item = u8>,
             Self: Sized;
}
Expand description

A type that can be decoded from a bytestring, ensuring that every valid encoding maps to exactly one member of Self.

Definition

Required Methods§

Source

fn decode<Producer>( producer: &mut Producer, ) -> impl Future<Output = Result<Self, DecodeError<Producer::Error>>>
where Producer: BulkProducer<Item = u8>, Self: Sized,

Decade a value to a bytestring in a specific way that is best described over at willowprotocol.org.

Definition

Implementors§