Type Alias rocket_db_pools::diesel::QueryResult

source ·
pub type QueryResult<T, E = Debug<Error>> = Result<T, E>;
Expand description

Alias of a Result with an error type of Debug for a diesel::Error.

QueryResult is a Responder when T (the Ok value) is a Responder. By using this alias as a route handler’s return type, the ? operator can be applied to fallible diesel functions in the route handler while still providing a valid Responder return type.

See the module level docs for a usage example.

Aliased Type§

enum QueryResult<T, E = Debug<Error>> {
    Ok(T),
    Err(E),
}

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(E)

Contains the error value