Struct rocket::http::uri::Error[][src]

pub struct Error<'a> { /* fields omitted */ }
Expand description

Error emitted on URI parse failure.

Internally, the type includes information about where the parse error occured (the error’s context) and information about what went wrong. Externally, this information can be retrieved (in textual form) through its Display implementation. In other words, by printing a value of this type.

Implementations

Returns the byte index into the text where the error occurred if it is known.

Example

use rocket::http::uri::Origin;

let err = Origin::parse("/foo bar").unwrap_err();
assert_eq!(err.index(), Some(4));

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

The owned version of the type.

Converts self into an owned version of itself.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Converts self into a collection.

Should always be Self

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Get the TypeId of this object.