Trait tor_cell::relaycell::msg::Body [−][src]
pub trait Body: Sized { fn into_message(self) -> RelayMsg; fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>; fn encode_onto(self, w: &mut Vec<u8>); }
Expand description
Internal: traits in common different cell bodies.
Required methods
fn into_message(self) -> RelayMsg
fn into_message(self) -> RelayMsg
Convert this type into a RelayMsg, wrapped appropriate.
fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>
fn decode_from_reader(r: &mut Reader<'_>) -> Result<Self>
Decode a relay cell body from a provided reader.
fn encode_onto(self, w: &mut Vec<u8>)
fn encode_onto(self, w: &mut Vec<u8>)
Encode the body of this cell into the end of a vec.