#[non_exhaustive]pub enum ResourceError {
RelativeReference,
InvalidCharacters,
InvalidPercentEncoding,
InvalidHttpUri(InvalidUri),
MissingHttpAuthority,
}Expand description
Errors that can occur while parsing a WebFinger resource URI.
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.
RelativeReference
The resource is a relative reference instead of an absolute URI.
InvalidCharacters
The resource contains raw text outside the URI character set.
Resource URI text must be ASCII and every byte must be allowed by RFC 3986 as an
unreserved, reserved, or percent-escape marker byte. Characters outside that set, such
as {, |, ^, and non-ASCII code points, must be percent-encoded before parsing.
InvalidPercentEncoding
The resource contains a malformed percent escape.
InvalidHttpUri(InvalidUri)
The resource is an invalid HTTP or HTTPS URI.
MissingHttpAuthority
The resource is an HTTP or HTTPS URI without an authority.
Trait Implementations§
Source§impl Debug for ResourceError
impl Debug for ResourceError
Source§impl Display for ResourceError
impl Display for ResourceError
Source§impl Error for ResourceError
impl Error for ResourceError
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<InvalidUri> for ResourceError
impl From<InvalidUri> for ResourceError
Source§fn from(source: InvalidUri) -> Self
fn from(source: InvalidUri) -> Self
Converts to this type from the input type.
Source§impl From<ResourceError> for Error
impl From<ResourceError> for Error
Source§fn from(source: ResourceError) -> Self
fn from(source: ResourceError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ResourceError
impl RefUnwindSafe for ResourceError
impl Send for ResourceError
impl Sync for ResourceError
impl Unpin for ResourceError
impl UnsafeUnpin for ResourceError
impl UnwindSafe for ResourceError
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