Enum rocket_contrib::json::JsonError
source · pub enum JsonError<'a> {
Io(Error),
Parse(&'a str, Error),
}
Expand description
An error returned by the Json
data guard when incoming data fails to
serialize as JSON.
Variants§
Io(Error)
An I/O error occurred while reading the incoming request data.
Parse(&'a str, Error)
The client’s data was received successfully but failed to parse as valid
JSON or as the requested type. The &str
value in .0
is the raw data
received from the user, while the Error
in .1
is the deserialization
error from serde
.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for JsonError<'a>
impl<'a> !RefUnwindSafe for JsonError<'a>
impl<'a> Send for JsonError<'a>
impl<'a> Sync for JsonError<'a>
impl<'a> Unpin for JsonError<'a>
impl<'a> !UnwindSafe for JsonError<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> IntoCollection<T> for T
impl<T> IntoCollection<T> for T
source§impl<T> IntoSql for T
impl<T> IntoSql for T
source§fn into_sql<T>(self) -> Self::Expressionwhere
Self: Sized + AsExpression<T>,
fn into_sql<T>(self) -> Self::Expressionwhere
Self: Sized + AsExpression<T>,
Convert
self
to an expression for Diesel’s query builder. Read moresource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expressionwhere
&'a Self: AsExpression<T>,
Convert
&self
to an expression for Diesel’s query builder. Read more