Enum arc_reactor::core::QueryParseError[][src]

pub enum QueryParseError {
    Err(Error),
    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

This example is not tested
#[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": "{parse error}" }' if it failed to deserialize.
}

Variants

This error occurs when deserialization fails for the query

this error occurs when there is no query data in the uri

Trait Implementations

impl From<QueryParseError> for Response
[src]

Performs the conversion.

impl Debug for QueryParseError
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations