#[non_exhaustive]pub enum WebUrlError {
Character {
found: char,
at: usize,
},
Escape {
at: usize,
},
Scheme,
Host,
UserInfo,
Port,
}Expand description
Why a string is not a WebUrl.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Character
A character a URL may only carry percent-encoded: whitespace, a
control character, ", \, <, >, ^, `, {, |, },
anything outside ASCII, or a [ or ] outside the host.
Escape
A % not followed by two hex digits.
Scheme
The scheme is missing or is not http or https.
Host
No // after the scheme, an empty host, or a malformed IPv6 literal.
UserInfo
A user name or password before the host.
Port
A port that is empty, not decimal, or above 65535.
Trait Implementations§
Source§impl Clone for WebUrlError
impl Clone for WebUrlError
impl Copy for WebUrlError
Source§impl Debug for WebUrlError
impl Debug for WebUrlError
Source§impl Display for WebUrlError
impl Display for WebUrlError
impl Eq for WebUrlError
Source§impl Error for WebUrlError
impl Error for WebUrlError
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 WebUrlError
impl PartialEq for WebUrlError
impl StructuralPartialEq for WebUrlError
Auto Trait Implementations§
impl Freeze for WebUrlError
impl RefUnwindSafe for WebUrlError
impl Send for WebUrlError
impl Sync for WebUrlError
impl Unpin for WebUrlError
impl UnsafeUnpin for WebUrlError
impl UnwindSafe for WebUrlError
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