Enum arc_reactor::QueryParseError
[−]
[src]
pub enum QueryParseError {
SerdeError(Error),
ParseError(ParseError),
None,
}the error returned by Request::query()
From<QueryParseError> is implemented for Response
so you can use the ? to unwrap or return an early response
#[service] fn UserService(req: Request, res: Response) { let AccessToken { token } = req.query()?; // will return an error response with the json '{ "error": "query data was empty" }' if QueryParseError::None // or '{ "error": "{serde error}" }' if it failed to deserialize. // or '{ "error": "{parse error}" }' if it failed to parse. }
Variants
SerdeError(Error)ParseError(ParseError)None
Trait Implementations
impl From<QueryParseError> for Response[src]
fn from(error: QueryParseError) -> Response[src]
Performs the conversion.