Skip to main content

Body

Trait Body 

Source
pub trait Body: Sized {
    // Required methods
    fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>;
    fn encode_onto<W: Writer + ?Sized>(self, w: &mut W) -> EncodeResult<()>;
}
Expand description

Internal: traits in common different cell bodies.

Required Methods§

Source

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

Decode a relay cell body from a provided reader.

Source

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

Encode the body of this cell into the end of a writer.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§