[][src]Enum uriparse::relative_reference::RelativeReferenceError

#[non_exhaustive]pub enum RelativeReferenceError {
    AbsolutePathStartsWithTwoSlashes,
    Authority(AuthorityError),
    Fragment(FragmentError),
    Path(PathError),
    Query(QueryError),
    MissingPath,
    NotRelativeReference,
    SchemelessPathStartsWithColonSegment,
}

An error representing an invalid relative reference.

Variants (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.
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

impl Clone for RelativeReferenceError[src]

impl Copy for RelativeReferenceError[src]

impl Debug for RelativeReferenceError[src]

impl Display for RelativeReferenceError[src]

impl Eq for RelativeReferenceError[src]

impl Error for RelativeReferenceError[src]

impl From<AuthorityError> for RelativeReferenceError[src]

impl From<FragmentError> for RelativeReferenceError[src]

impl From<Infallible> for RelativeReferenceError[src]

impl From<PathError> for RelativeReferenceError[src]

impl From<QueryError> for RelativeReferenceError[src]

impl Hash for RelativeReferenceError[src]

impl PartialEq<RelativeReferenceError> for RelativeReferenceError[src]

impl StructuralEq for RelativeReferenceError[src]

impl StructuralPartialEq for RelativeReferenceError[src]

impl TryFrom<URIReferenceError> for RelativeReferenceError[src]

type Error = ()

The type returned in the event of a conversion error.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.