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>) -> EncodeResult<()>;
}Expand description
Internal: traits in common different cell bodies.
Required Methods
sourcefn into_message(self) -> RelayMsg
fn into_message(self) -> RelayMsg
Convert this type into a RelayMsg, wrapped appropriate.
sourcefn 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.
sourcefn encode_onto(self, w: &mut Vec<u8>) -> EncodeResult<()>
fn encode_onto(self, w: &mut Vec<u8>) -> EncodeResult<()>
Encode the body of this cell into the end of a vec.
Implementors
impl Body for EstablishIntro
Available on crate feature
onion-service only.impl Body for EstablishRendezvous
Available on crate feature
onion-service only.impl Body for Introduce1
Available on crate feature
onion-service only.impl Body for Introduce2
Available on crate feature
onion-service only.impl Body for ConnectUdp
Available on crate feature
experimental-udp only.impl Body for ConnectedUdp
Available on crate feature
experimental-udp only.impl Body for Datagram
Available on crate feature
experimental-udp only.