Enum iref::Error [−][src]
pub enum Error {
InvalidEncoding,
InvalidPercentEncoding,
MissingScheme,
InvalidScheme,
InvalidAuthority,
InvalidUserInfo,
InvalidHost,
InvalidPort,
InvalidSegment,
InvalidPath,
InvalidQuery,
InvalidFragment,
}
Expand description
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
Auto Trait Implementations
impl RefUnwindSafe for Error
impl UnwindSafe for Error
Blanket Implementations
Mutably borrows from an owned value. Read more