TurboBincodeDecode

Trait TurboBincodeDecode 

Source
pub trait TurboBincodeDecode<Context>: Decode<Context> {
    // Required method
    fn decode(
        decoder: &mut TurboBincodeDecoder<'_>,
    ) -> Result<Self, DecodeError>;
}
Expand description

Represents a type that can only be decoded with a TurboBincodeDecoder and an empty () context.

All traits implementing this must also implement the more generic Decode trait, but they should panic if any other encoder is used.

Use impl_decode_for_turbo_bincode_decode to automatically implement the Decode trait from this one.

Required Methods§

Source

fn decode(decoder: &mut TurboBincodeDecoder<'_>) -> Result<Self, DecodeError>

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§