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.
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(), Some(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.
impl<T> Any for T where
T: 'static + ?Sized,
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
impl<T, U> Into<U> for T where
U: From<T>,
Converts self
into a collection.
Converts the given value to a String
. Read more
The type returned in the event of a conversion error.
The type returned in the event of a conversion error.
Get the TypeId
of this object.