Trait cuprate_levin::LevinBody

source ·
pub trait LevinBody: Sized {
    type Command: LevinCommand + Debug;

    // Required methods
    fn decode_message<B: Buf>(
        body: &mut B,
        typ: MessageType,
        command: Self::Command,
    ) -> Result<Self, BucketError>;
    fn encode(
        self,
        builder: &mut BucketBuilder<Self::Command>,
    ) -> Result<(), BucketError>;
}
Expand description

A levin body

Required Associated Types§

Required Methods§

source

fn decode_message<B: Buf>( body: &mut B, typ: MessageType, command: Self::Command, ) -> Result<Self, BucketError>

Decodes the message from the data in the header

source

fn encode( self, builder: &mut BucketBuilder<Self::Command>, ) -> Result<(), BucketError>

Encodes the message

Object Safety§

This trait is not object safe.

Implementors§