pub enum NetError {
MalformedUrl(String),
UnsupportedScheme(String),
UnexpectedScheme {
expected: String,
found: String,
},
InvalidPort(String),
InvalidHead(String),
OversizeBody(usize),
}Expand description
Errors produced by the net-core parsing primitives.
These describe malformed or oversize wire data only. They carry no I/O or application context; callers translate them into their own error domain.
Variants§
MalformedUrl(String)
The URL did not contain a scheme:// separator, or was otherwise
structurally malformed (e.g. missing host).
UnsupportedScheme(String)
The URL scheme is not one this crate recognizes for default-port resolution.
UnexpectedScheme
The URL scheme did not match the scheme a caller required (via
parse_url_for_scheme).
Fields
InvalidPort(String)
The URL port component could not be parsed as a u16.
InvalidHead(String)
The HTTP response head (status line + headers) was malformed.
OversizeBody(usize)
A length-prefixed or buffered payload exceeded the caller’s size limit.
Trait Implementations§
impl Eq for NetError
Source§impl Error for NetError
impl Error for NetError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for NetError
Auto Trait Implementations§
impl Freeze for NetError
impl RefUnwindSafe for NetError
impl Send for NetError
impl Sync for NetError
impl Unpin for NetError
impl UnsafeUnpin for NetError
impl UnwindSafe for NetError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more