Trait RelativeDecodable

Source
pub trait RelativeDecodable<R> {
    // Required method
    fn relative_decode<Producer>(
        reference: &R,
        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 used to decode T from a bytestring encoded relative to Self. This can be used to decode a compact encoding frow which T can be derived by anyone with R.

Required Methods§

Source

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

Decode a value (relative to a reference value) to a bytestring in a specific way that is best described over at willowprotocol.org.

Implementors§