pub enum ResourceUriError {
Empty,
NotAbsolute,
NoAuthority,
NoOrigin,
}Expand description
Why a string is not a usable resource identifier.
Variants§
Empty
The value was blank.
NotAbsolute
There was no scheme://, or the scheme was not a legal one.
RFC 9728 §2 requires an absolute URI, so this is a refusal rather than
something to guess at: a relative identifier cannot be compared against
a token’s aud, which is the only thing it is for.
NoAuthority
The authority was empty between :// and the first /.
NoOrigin
The derived metadata path was not usable.
Unreachable through ResourceUri::new — the constructor refuses
anything without an authority — so it exists to give
ResourceUri::metadata_url an error type rather than a panic.
Trait Implementations§
Source§impl Clone for ResourceUriError
impl Clone for ResourceUriError
impl Copy for ResourceUriError
Source§impl Debug for ResourceUriError
impl Debug for ResourceUriError
Source§impl Display for ResourceUriError
impl Display for ResourceUriError
impl Eq for ResourceUriError
Source§impl Error for ResourceUriError
impl Error for ResourceUriError
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 ResourceUriError
impl PartialEq for ResourceUriError
impl StructuralPartialEq for ResourceUriError
Auto Trait Implementations§
impl Freeze for ResourceUriError
impl RefUnwindSafe for ResourceUriError
impl Send for ResourceUriError
impl Sync for ResourceUriError
impl Unpin for ResourceUriError
impl UnsafeUnpin for ResourceUriError
impl UnwindSafe for ResourceUriError
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