pub trait DecodableMessage {
    type Error;
    type Decoder;

    // Required method
    fn decode(
        msg: ValidatedMessage<Bytes>,
        decoder: &Self::Decoder
    ) -> Result<Self, Self::Error>
       where Self: Sized;
}
Expand description

Messages which can be decoded from a ValidatedMessage stream.

Required Associated Types§

source

type Error

The error returned when a message fails to decode

source

type Decoder

The decoder used to decode a validated message

Required Methods§

source

fn decode( msg: ValidatedMessage<Bytes>, decoder: &Self::Decoder ) -> Result<Self, Self::Error>
where Self: Sized,

Decode the given message, using the given decoder, into its structured type

Implementors§