Enum uriparse::uri::InvalidURI
source · #[non_exhaustive]
pub enum InvalidURI {
AbsolutePathCannotStartWithTwoSlashes,
CannotBeRelativeReference,
InvalidAuthority(InvalidAuthority),
InvalidFragment(InvalidFragment),
InvalidPath(InvalidPath),
InvalidQuery(InvalidQuery),
InvalidScheme(InvalidScheme),
MissingPath,
MissingScheme,
}
Expand description
An error representing an invalid URI.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
AbsolutePathCannotStartWithTwoSlashes
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
).
CannotBeRelativeReference
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.
InvalidAuthority(InvalidAuthority)
The authority component of the relative reference was invalid.
InvalidFragment(InvalidFragment)
The fragment component of the relative reference was invalid.
InvalidPath(InvalidPath)
The path component of the relative reference was invalid.
InvalidQuery(InvalidQuery)
The query component of the relative reference was invalid.
InvalidScheme(InvalidScheme)
The scheme 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
.
Trait Implementations
sourceimpl Clone for InvalidURI
impl Clone for InvalidURI
sourcefn clone(&self) -> InvalidURI
fn clone(&self) -> InvalidURI
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more