#[non_exhaustive]pub enum UrlPolicyError {
NotHttps,
Credentials,
NoHost,
NonPublicHost,
Malformed,
}Expand description
Why validate_public_https_url refused a URL.
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.
NotHttps
The URL is not https://, or it has no scheme:// separator.
Credentials
The authority carries userinfo (user:pass@host).
NoHost
The host is empty.
NonPublicHost
The host is a non-public address, a local or internal name, or a single-label name.
Malformed
The authority or host is not a shape this check accepts (a legacy IPv4 spelling such as
0x7f.1, or an unclosed IPv6 bracket).
Trait Implementations§
Source§impl Clone for UrlPolicyError
impl Clone for UrlPolicyError
impl Copy for UrlPolicyError
Source§impl Debug for UrlPolicyError
impl Debug for UrlPolicyError
Source§impl Display for UrlPolicyError
impl Display for UrlPolicyError
impl Eq for UrlPolicyError
Source§impl Error for UrlPolicyError
impl Error for UrlPolicyError
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 Hash for UrlPolicyError
impl Hash for UrlPolicyError
Source§impl PartialEq for UrlPolicyError
impl PartialEq for UrlPolicyError
impl StructuralPartialEq for UrlPolicyError
Auto Trait Implementations§
impl Freeze for UrlPolicyError
impl RefUnwindSafe for UrlPolicyError
impl Send for UrlPolicyError
impl Sync for UrlPolicyError
impl Unpin for UrlPolicyError
impl UnsafeUnpin for UrlPolicyError
impl UnwindSafe for UrlPolicyError
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