logo
pub struct Error<'a> { /* private fields */ }
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

Converts to this type from the input type.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.