#[non_exhaustive]
pub enum RelativeReferenceError {
AbsolutePathStartsWithTwoSlashes,
Authority(AuthorityError),
Fragment(FragmentError),
Path(PathError),
Query(QueryError),
MissingPath,
NotRelativeReference,
SchemelessPathStartsWithColonSegment,
}
Expand description
An error representing an invalid relative reference.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
AbsolutePathStartsWithTwoSlashes
Represents the case where there is no authority, but the first path segment starts with
"//"
. This is not allowed because it would be interpreted as an authority component.
This can only occur when using creation functions that act on individual parts (e.g.
RelativeReference::from_parts
).
Authority(AuthorityError)
The authority component of the relative reference was invalid.
Fragment(FragmentError)
The fragment component of the relative reference was invalid.
Path(PathError)
The path component of the relative reference was invalid.
Query(QueryError)
The query component of the relative reference was invalid.
MissingPath
This error occurs when you do not specify a path component on the builder.
This can only occur when using RelativeReferenceBuilder
.
NotRelativeReference
When parsing from some byte string source, if the source ends up being a URI, then it is obviously not a relative reference.
This can only occur when parsing from a byte string source.
SchemelessPathStartsWithColonSegment
Represents the case where the first path segment contains a ':'
. This is not allowed
because it would be interpreted as a scheme component.
This can only occur when using creation functions that act on individual parts (e.g.
RelativeReference::from_parts
).
Trait Implementations
sourceimpl Clone for RelativeReferenceError
impl Clone for RelativeReferenceError
sourcefn clone(&self) -> RelativeReferenceError
fn clone(&self) -> RelativeReferenceError
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RelativeReferenceError
impl Debug for RelativeReferenceError
sourceimpl Display for RelativeReferenceError
impl Display for RelativeReferenceError
sourceimpl Error for RelativeReferenceError
impl Error for RelativeReferenceError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
sourceimpl From<AuthorityError> for RelativeReferenceError
impl From<AuthorityError> for RelativeReferenceError
sourcefn from(value: AuthorityError) -> Self
fn from(value: AuthorityError) -> Self
Performs the conversion.
sourceimpl From<FragmentError> for RelativeReferenceError
impl From<FragmentError> for RelativeReferenceError
sourcefn from(value: FragmentError) -> Self
fn from(value: FragmentError) -> Self
Performs the conversion.
sourceimpl From<Infallible> for RelativeReferenceError
impl From<Infallible> for RelativeReferenceError
sourcefn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Performs the conversion.
sourceimpl From<PathError> for RelativeReferenceError
impl From<PathError> for RelativeReferenceError
sourceimpl From<QueryError> for RelativeReferenceError
impl From<QueryError> for RelativeReferenceError
sourcefn from(value: QueryError) -> Self
fn from(value: QueryError) -> Self
Performs the conversion.
sourceimpl Hash for RelativeReferenceError
impl Hash for RelativeReferenceError
sourceimpl PartialEq<RelativeReferenceError> for RelativeReferenceError
impl PartialEq<RelativeReferenceError> for RelativeReferenceError
sourcefn eq(&self, other: &RelativeReferenceError) -> bool
fn eq(&self, other: &RelativeReferenceError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &RelativeReferenceError) -> bool
fn ne(&self, other: &RelativeReferenceError) -> bool
This method tests for !=
.
impl Copy for RelativeReferenceError
impl Eq for RelativeReferenceError
impl StructuralEq for RelativeReferenceError
impl StructuralPartialEq for RelativeReferenceError
Auto Trait Implementations
impl RefUnwindSafe for RelativeReferenceError
impl Send for RelativeReferenceError
impl Sync for RelativeReferenceError
impl Unpin for RelativeReferenceError
impl UnwindSafe for RelativeReferenceError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more