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),
}