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 occurred (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(), 4);

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Converts self into a collection.

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.