Function encode

Source
pub fn encode(header: ProxyHeader) -> Result<BytesMut, EncodeError>
Expand description

Encodes a PROXY header from the given header definition.

This will perform heap allocations; they’re kept to a minimum, but there is no guarantee there will be only one.