#[non_exhaustive]pub enum ProxyError {
Show 16 variants
OutputTooSmall {
need: usize,
},
NotProxy,
V1TooLong,
V1Syntax {
at: u8,
},
V1BadAddress,
V1BadPort,
V2BadVersion,
V2BadCommand,
V2BadFamily,
V2LengthTooLarge {
declared: u16,
max: u16,
},
V2AddressTooShort,
V2TlvOverrun,
V2CrcMismatch,
V2UniqueIdTooLong,
V2SslMalformed,
FamilyMismatch,
}Expand description
Why a PROXY header was refused.
assert_eq!(net_io::ProxyError::V1TooLong.to_string(), "v1 header longer than 107 bytes");Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
OutputTooSmall
encode: the output buffer cannot hold the header.
NotProxy
The first bytes match no allowed signature.
V1TooLong
A v1 line longer than 107 bytes.
V1Syntax
A v1 line that does not follow the grammar.
V1BadAddress
A v1 address that does not parse.
V1BadPort
A v1 port that does not parse.
V2BadVersion
A v2 version nibble other than 2.
V2BadCommand
A v2 command other than LOCAL or PROXY.
V2BadFamily
A v2 family and transport byte not in the specification, on a PROXY command. A LOCAL header ignores its family and address block.
V2LengthTooLarge
A v2 length above the configured maximum.
V2AddressTooShort
A v2 address block shorter than its family needs, on a PROXY command. A LOCAL header ignores its address block.
V2TlvOverrun
A v2 TLV that runs past the declared length.
V2CrcMismatch
A v2 CRC32C TLV that does not match.
V2UniqueIdTooLong
A v2 unique id longer than 128 bytes.
V2SslMalformed
A v2 SSL TLV that does not parse.
FamilyMismatch
Addresses of a different family than the header declares.
Trait Implementations§
Source§impl Clone for ProxyError
impl Clone for ProxyError
impl Copy for ProxyError
Source§impl Debug for ProxyError
impl Debug for ProxyError
Source§impl Display for ProxyError
impl Display for ProxyError
impl Eq for ProxyError
Source§impl Error for ProxyError
impl Error for ProxyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()