pub trait WriteToHeader {
// Required method
fn write_to(&self, writer: &mut Writer) -> Result<usize, Error>;
// Provided method
fn to_bytes(&self) -> Result<Vec<u8>, Error> { ... }
}
Expand description
Defines how to write a type as part of a binary PROXY protocol header.