pub enum InvalidUrl {
InvalidScheme(InvalidScheme),
InvalidFileHost(InvalidFileHost),
InvalidSpecialNotFileHost(InvalidSpecialNotFileHost),
InvalidNonSpecialHost(InvalidNonSpecialHost),
InvalidPort(InvalidPort),
TooLong(TooLong),
MissingScheme,
EmptyHostCantHaveUserinfoOrPort,
}Expand description
The enum of errors that can occur when trying to parse an invalid URL.
Variants§
InvalidScheme(InvalidScheme)
InvalidFileHost(InvalidFileHost)
InvalidSpecialNotFileHost(InvalidSpecialNotFileHost)
InvalidNonSpecialHost(InvalidNonSpecialHost)
InvalidPort(InvalidPort)
TooLong(TooLong)
MissingScheme
Returned when attempting to parse a URL with no scheme.
EmptyHostCantHaveUserinfoOrPort
Returned when attempting to parse a URL with an empty host and a userinfo and/or port.
Trait Implementations§
Source§impl Debug for InvalidUrl
impl Debug for InvalidUrl
Source§impl Display for InvalidUrl
impl Display for InvalidUrl
Source§impl Error for InvalidUrl
impl Error for InvalidUrl
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<InvalidFileHost> for InvalidUrl
impl From<InvalidFileHost> for InvalidUrl
Source§fn from(source: InvalidFileHost) -> Self
fn from(source: InvalidFileHost) -> Self
Converts to this type from the input type.
Source§impl From<InvalidNonSpecialHost> for InvalidUrl
impl From<InvalidNonSpecialHost> for InvalidUrl
Source§fn from(source: InvalidNonSpecialHost) -> Self
fn from(source: InvalidNonSpecialHost) -> Self
Converts to this type from the input type.
Source§impl From<InvalidPort> for InvalidUrl
impl From<InvalidPort> for InvalidUrl
Source§fn from(source: InvalidPort) -> Self
fn from(source: InvalidPort) -> Self
Converts to this type from the input type.
Source§impl From<InvalidScheme> for InvalidUrl
impl From<InvalidScheme> for InvalidUrl
Source§fn from(source: InvalidScheme) -> Self
fn from(source: InvalidScheme) -> Self
Converts to this type from the input type.
Source§impl From<InvalidSpecialNotFileHost> for InvalidUrl
impl From<InvalidSpecialNotFileHost> for InvalidUrl
Source§fn from(source: InvalidSpecialNotFileHost) -> Self
fn from(source: InvalidSpecialNotFileHost) -> Self
Converts to this type from the input type.
Source§impl From<InvalidUrl> for InvalidJoin
impl From<InvalidUrl> for InvalidJoin
Source§fn from(source: InvalidUrl) -> Self
fn from(source: InvalidUrl) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for InvalidUrl
impl RefUnwindSafe for InvalidUrl
impl Send for InvalidUrl
impl Sync for InvalidUrl
impl Unpin for InvalidUrl
impl UnsafeUnpin for InvalidUrl
impl UnwindSafe for InvalidUrl
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