Trait tor_cell::chancell::msg::Body

source ·
pub trait Body: Readable {
    // Required method
    fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>;

    // Provided method
    fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self> { ... }
}
Expand description

Trait for the ‘bodies’ of channel messages.

Required Methods§

source

fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>

Consume this message and encode its body onto w.

Does not encode anything but the cell body, and does not pad to the cell length.

Provided Methods§

source

fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>

Decode a channel cell body from a provided reader.

Object Safety§

This trait is not object safe.

Implementors§