Trait TrustedRelativeDecodable

Source
pub trait TrustedRelativeDecodable<R>: Sized {
    // Required method
    unsafe fn trusted_relative_decode<P>(
        producer: &mut P,
        r: &R,
    ) -> impl Future<Output = Result<Self, DecodeError<P::Final, P::Error, Blame>>>
       where P: BulkProducer<Item = u8>;
}
Expand description

Methods for decoding trusted encodings (that is, data which was deemed trustworthy prior to encoding), relative to type R.

Required Methods§

Source

unsafe fn trusted_relative_decode<P>( producer: &mut P, r: &R, ) -> impl Future<Output = Result<Self, DecodeError<P::Final, P::Error, Blame>>>
where P: BulkProducer<Item = u8>,

§Safety

This function is only intended to decode types which have been deemed trusted prior to their encoding. Using it to decode encodings from untrusted sources will result in immediate undefined behaviour!

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§