Type Alias diesel::prelude::QueryResult

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

A specialized result type for queries.

This type is exported by diesel::prelude, and is generally used by any code which is interacting with Diesel. This type exists to avoid writing out diesel::result::Error, and is otherwise a direct mapping to Result.

Aliased Type§

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

Variants§

§1.0.0

Ok(T)

Contains the success value

§1.0.0

Err(Error)

Contains the error value

Trait Implementations§

source§

impl<T> OptionalEmptyChangesetExtension<T> for QueryResult<T>

source§

fn optional_empty_changeset(self) -> Result<Option<T>, Error>

By default, Diesel treats an empty update as a QueryBuilderError. This method will convert that error into None. Read more
source§

impl<T> OptionalExtension<T> for QueryResult<T>

source§

fn optional(self) -> Result<Option<T>, Error>

Converts a QueryResult<T> into a QueryResult<Option<T>>. Read more