#[non_exhaustive]pub enum ConnectError {
Show 14 variants
InvalidTarget,
InvalidHeader,
InvalidCredentials,
DuplicateAuthorization,
ReservedHeader,
RequestHeadTooLarge {
len: usize,
max: usize,
},
Io(String),
MalformedStatus,
MalformedHeader,
StatusLineTooLarge {
max: usize,
},
HeaderLineTooLarge {
max: usize,
},
ResponseHeadTooLarge {
max: usize,
},
TooManyHeaders {
max: usize,
},
UnexpectedEof,
}Expand description
Neutral CONNECT wire error.
All variants are fail-closed protocol failures. Messages are fixed strings or bounded sizes; they never include raw credentials or unbounded proxy-controlled bytes.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidTarget
CONNECT target host/port is invalid (empty, control bytes, bad brackets).
InvalidHeader
A caller-supplied header name/value is invalid or unsafe.
InvalidCredentials
Proxy credentials are invalid (control characters, bad shape).
DuplicateAuthorization
Duplicate Proxy-Authorization was supplied.
ReservedHeader
A reserved header would override generated framing.
RequestHeadTooLarge
Serialized request head exceeds the caller-provided bound.
Io(String)
Underlying transport I/O failed.
MalformedStatus
Status line is syntactically invalid.
MalformedHeader
A header line is syntactically invalid.
StatusLineTooLarge
Status line exceeds the caller-provided bound.
HeaderLineTooLarge
A header line exceeds the caller-provided bound.
ResponseHeadTooLarge
Aggregate response head exceeds the caller-provided bound.
TooManyHeaders
Response carries more header fields than allowed.
UnexpectedEof
Stream ended before the response head completed.
Trait Implementations§
Source§impl Clone for ConnectError
impl Clone for ConnectError
Source§fn clone(&self) -> ConnectError
fn clone(&self) -> ConnectError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ConnectError
impl Debug for ConnectError
Source§impl Display for ConnectError
impl Display for ConnectError
impl Eq for ConnectError
Source§impl Error for ConnectError
impl Error for ConnectError
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()