Enum uriparse::uri_reference::URIReferenceError
source · [−]#[non_exhaustive]
pub enum URIReferenceError {
AbsolutePathStartsWithTwoSlashes,
Authority(AuthorityError),
Fragment(FragmentError),
MissingPath,
Path(PathError),
Query(QueryError),
Scheme(SchemeError),
SchemelessPathStartsWithColonSegment,
}
Expand description
An error representing an invalid URI reference.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
AbsolutePathStartsWithTwoSlashes
Represents the case when 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.
URIReference::from_parts
).
Authority(AuthorityError)
The authority component of the relative reference was invalid.
Fragment(FragmentError)
The fragment 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 URIReferenceBuilder
.
Path(PathError)
The path component of the relative reference was invalid.
Query(QueryError)
The query component of the relative reference was invalid.
Scheme(SchemeError)
The scheme component of the relative reference was invalid.
SchemelessPathStartsWithColonSegment
Represents the case when 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.
URIReference::from_parts
).
Trait Implementations
sourceimpl Clone for URIReferenceError
impl Clone for URIReferenceError
sourcefn clone(&self) -> URIReferenceError
fn clone(&self) -> URIReferenceError
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 URIReferenceError
impl Debug for URIReferenceError
sourceimpl Display for URIReferenceError
impl Display for URIReferenceError
sourceimpl Error for URIReferenceError
impl Error for URIReferenceError
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 URIReferenceError
impl From<AuthorityError> for URIReferenceError
sourcefn from(value: AuthorityError) -> Self
fn from(value: AuthorityError) -> Self
Performs the conversion.
sourceimpl From<FragmentError> for URIReferenceError
impl From<FragmentError> for URIReferenceError
sourcefn from(value: FragmentError) -> Self
fn from(value: FragmentError) -> Self
Performs the conversion.
sourceimpl From<Infallible> for URIReferenceError
impl From<Infallible> for URIReferenceError
sourcefn from(_: Infallible) -> Self
fn from(_: Infallible) -> Self
Performs the conversion.
sourceimpl From<PathError> for URIReferenceError
impl From<PathError> for URIReferenceError
sourceimpl From<QueryError> for URIReferenceError
impl From<QueryError> for URIReferenceError
sourcefn from(value: QueryError) -> Self
fn from(value: QueryError) -> Self
Performs the conversion.
sourceimpl From<SchemeError> for URIReferenceError
impl From<SchemeError> for URIReferenceError
sourcefn from(value: SchemeError) -> Self
fn from(value: SchemeError) -> Self
Performs the conversion.
sourceimpl Hash for URIReferenceError
impl Hash for URIReferenceError
sourceimpl PartialEq<URIReferenceError> for URIReferenceError
impl PartialEq<URIReferenceError> for URIReferenceError
sourcefn eq(&self, other: &URIReferenceError) -> bool
fn eq(&self, other: &URIReferenceError) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &URIReferenceError) -> bool
fn ne(&self, other: &URIReferenceError) -> bool
This method tests for !=
.
sourceimpl TryFrom<URIReferenceError> for URIError
impl TryFrom<URIReferenceError> for URIError
impl Copy for URIReferenceError
impl Eq for URIReferenceError
impl StructuralEq for URIReferenceError
impl StructuralPartialEq for URIReferenceError
Auto Trait Implementations
impl RefUnwindSafe for URIReferenceError
impl Send for URIReferenceError
impl Sync for URIReferenceError
impl Unpin for URIReferenceError
impl UnwindSafe for URIReferenceError
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