[][src]Enum iref::Error

pub enum Error {
    InvalidEncoding,
    InvalidPercentEncoding,
    MissingScheme,
    InvalidScheme,
    InvalidAuthority,
    InvalidUserInfo,
    InvalidHost,
    InvalidPort,
    InvalidSegment,
    InvalidPath,
    InvalidQuery,
    InvalidFragment,
}

Parsing errors.

These are the different errors raised when some part of an IRI or IRI reference has an invalid syntax or encoding.

Variants

InvalidEncoding

The input data is not a valid UTF-8 encoded string.

InvalidPercentEncoding

The IRI part support percent-encoding, but the input data as an invalid percent-encoded character. This can occur for instance while trying to parse a query with the invalid percent encoded character %9a: Query::try_from("Hello Error %9a").

MissingScheme

Occurs when one is trying to convert an IriRef with no scheme into an Iri, or when an IRI is parsed with no scheme.

InvalidScheme

Occurs when the parsed Scheme is not syntactically valid. Note that even in an IRI, only ASCII letters, digit and symbols +, - and . are allowed.

InvalidAuthority

Occurs when the parsed Authority is not syntactically valid.

InvalidUserInfo

Occurs when the parsed UserInfo part of an Authority is not syntactically valid. Note that the userinfo part cannot include the @ character.

InvalidHost

Occurs when the parsed Host part of an Authority is not syntactically valid. Note that the host part cannot include the : character.

InvalidPort

Occurs when the parsed Port part of an Authority is not syntactically valid. This part may only contain ASCII digits.

InvalidSegment

Occurs when a path Segment is not syntactically valid. A Path segment cannot contain any / except at the end to denote "open" segments.

InvalidPath

Occurs when a Path is not syntactically valid. A path cannot contain the characters ? and # delimitating the Query and Fragment parts.

InvalidQuery

Occurs when a Query part is not syntactically valid.

InvalidFragment

Occurs when a Fragment part is not syntactically valid.

Trait Implementations

impl Clone for Error[src]

impl Debug for Error[src]

impl Display for Error[src]

impl Error for Error[src]

Auto Trait Implementations

impl RefUnwindSafe for Error

impl Send for Error

impl Sync for Error

impl Unpin for Error

impl UnwindSafe for Error

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.