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§
Sourcefn relative_decode<Producer>(
reference: &R,
producer: &mut Producer,
) -> impl Future<Output = Result<Self, DecodeError<Producer::Error>>>
fn relative_decode<Producer>( reference: &R, producer: &mut Producer, ) -> impl Future<Output = Result<Self, DecodeError<Producer::Error>>>
Decode a value (relative to a reference value) to a bytestring in a specific way that is best described over at willowprotocol.org.