pub trait TurboBincodeEncode: Encode {
// Required method
fn encode(
&self,
encoder: &mut TurboBincodeEncoder<'_>,
) -> Result<(), EncodeError>;
}Expand description
Represents a type that can only be encoded with a TurboBincodeEncoder.
All traits implementing this must also implement the more generic Encode trait, but they
should panic if any other encoder is used.
Use impl_encode_for_turbo_bincode_encode to automatically implement the Encode trait
from this one.
Required Methods§
fn encode( &self, encoder: &mut TurboBincodeEncoder<'_>, ) -> Result<(), EncodeError>
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.