Trait Body
pub trait Body {
// Required methods
fn encode_body<S: Sink>(&self, w: &mut Writer<S>) -> Result<(), S::Error>;
fn header_byte(&self) -> u8;
}Expand description
Required Methods§
fn encode_body<S: Sink>(&self, w: &mut Writer<S>) -> Result<(), S::Error>
fn encode_body<S: Sink>(&self, w: &mut Writer<S>) -> Result<(), S::Error>
Writes the variable header and payload.
§Errors
Returns the sink’s error if it cannot take the bytes.
fn header_byte(&self) -> u8
fn header_byte(&self) -> u8
The first byte of the fixed header: packet type and flags.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".