Skip to main content

Message

Trait Message 

Source
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§

Source

fn encode_message(&self, encoder: &mut impl Encode)

Source

fn decode_message(decoder: &mut impl Decode) -> Result<Self, ProtoError>
where Self: Sized,

Provided Methods§

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§