#[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§
Source§impl Clone for RelativeReferenceError
impl Clone for RelativeReferenceError
Source§fn clone(&self) -> RelativeReferenceError
fn clone(&self) -> RelativeReferenceError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more