pub enum HttpUrlError {
EmptyUrl,
MissingScheme,
UnsupportedScheme(String),
MissingHost,
InvalidPort(String),
PortOutOfRange(u64),
InvalidHost(String),
InvalidPercentEncoding(String),
UnicodeError,
BuilderValidation(String),
}Expand description
Errors that can occur when parsing or building an HttpUrl.
Variants§
EmptyUrl
The URL string is empty.
MissingScheme
Missing scheme (e.g., “http”, “https”).
UnsupportedScheme(String)
Unsupported scheme (only “http” and “https” are supported).
MissingHost
Missing host after “://”.
InvalidPort(String)
Invalid port number.
PortOutOfRange(u64)
Port number out of range (must be 0–65535).
InvalidHost(String)
Invalid host (e.g., empty label, too long, bad characters).
InvalidPercentEncoding(String)
Invalid percent-encoding (e.g., “%ZZ” or “%XX” with non-hex chars).
UnicodeError
Unicode normalization failure.
BuilderValidation(String)
Builder validation failed.
Trait Implementations§
Source§impl Clone for HttpUrlError
impl Clone for HttpUrlError
Source§fn clone(&self) -> HttpUrlError
fn clone(&self) -> HttpUrlError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HttpUrlError
impl Debug for HttpUrlError
Source§impl Display for HttpUrlError
impl Display for HttpUrlError
impl Eq for HttpUrlError
Source§impl Error for HttpUrlError
impl Error for HttpUrlError
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()
Source§impl PartialEq for HttpUrlError
impl PartialEq for HttpUrlError
Source§fn eq(&self, other: &HttpUrlError) -> bool
fn eq(&self, other: &HttpUrlError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for HttpUrlError
Auto Trait Implementations§
impl Freeze for HttpUrlError
impl RefUnwindSafe for HttpUrlError
impl Send for HttpUrlError
impl Sync for HttpUrlError
impl Unpin for HttpUrlError
impl UnsafeUnpin for HttpUrlError
impl UnwindSafe for HttpUrlError
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