pub trait Message {
// Required methods
fn encode_message(&self, encoder: &mut impl Encode);
fn decode_message(decoder: &mut impl Decode) -> Result<Self, ProtoError>
where Self: Sized;
// Provided method
fn message_size_hint(&self) -> usize { ... }
}Required Methods§
fn encode_message(&self, encoder: &mut impl Encode)
fn decode_message(decoder: &mut impl Decode) -> Result<Self, ProtoError>where
Self: Sized,
Provided Methods§
fn message_size_hint(&self) -> usize
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".