[][src]Enum uriparse::uri::URIError

#[non_exhaustive]pub enum URIError {
    AbsolutePathStartsWithTwoSlashes,
    Authority(AuthorityError),
    Fragment(FragmentError),
    MissingPath,
    MissingScheme,
    NotURI,
    Path(PathError),
    Query(QueryError),
    Scheme(SchemeError),
}

An error representing an invalid URI.

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 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. URI::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 URIBuilder.

MissingScheme

This error occurs when you do not specify a scheme component on the builder.

This can only occur when using URIBuilder.

NotURI

When parsing from some byte string source, if the source ends up being a relative reference, then it is obviously not a URI.

This can only occur when parsing from a byte string source.

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.

Trait Implementations

impl Clone for URIError[src]

impl Copy for URIError[src]

impl Debug for URIError[src]

impl Display for URIError[src]

impl Eq for URIError[src]

impl Error for URIError[src]

impl From<AuthorityError> for URIError[src]

impl From<FragmentError> for URIError[src]

impl From<Infallible> for URIError[src]

impl From<PathError> for URIError[src]

impl From<QueryError> for URIError[src]

impl From<SchemeError> for URIError[src]

impl Hash for URIError[src]

impl PartialEq<URIError> for URIError[src]

impl StructuralEq for URIError[src]

impl StructuralPartialEq for URIError[src]

impl TryFrom<URIReferenceError> for URIError[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.