pub enum HttpUrlError {
Parse(ParseError),
UnsupportedScheme(String),
BuilderValidation(String),
}Expand description
Errors that can occur when constructing or building an HttpUrl.
URL parsing itself is performed by the url crate; this enum only covers
the thin layer on top: forwarding url::ParseError and enforcing the
“http/https only” invariant.
Variants§
Parse(ParseError)
A URL string could not be parsed by the url crate.
UnsupportedScheme(String)
The URL’s scheme is not http or https.
BuilderValidation(String)
Builder validation failed (e.g. a required component was missing).
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
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 From<ParseError> for HttpUrlError
impl From<ParseError> for HttpUrlError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for HttpUrlError
impl PartialEq for HttpUrlError
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