Trait ppp::v2::WriteToHeader[][src]

pub trait WriteToHeader {
    fn write_to(&self, writer: &mut Writer) -> Result<usize>;

    fn to_bytes(&self) -> Result<Vec<u8>> { ... }
}
Expand description

Defines how to write a type as part of a binary PROXY protocol header.

Required methods

Write this instance to the given Writer. The Writer returns an IO error when an individual byte slice is longer than u16::MAX. However, the total length of the buffer may exceed u16::MAX.

Provided methods

Writes this instance to a temporary buffer and returns the buffer.

Implementations on Foreign Types

Implementors