pub struct Error<'a> { /* private fields */ }
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.
Returns the byte index into the text where the error occurred if it is
known.
use rocket::http::uri::Origin;
let err = Origin::parse("/foo bar").unwrap_err();
assert_eq!(err.index(), 4);
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.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Instruments this type with the provided
Span
, returning an
Instrumented
wrapper.
Read more
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.
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.