Struct bellhop::db::Db

source ·
pub struct Db<'a>(_);
Expand description

Opaque wrapper around a database connection.

Useful for model functions like [models::user::User::by_email].

Implementations§

Return a reference to the underlying database type.

You’ll need this function if you want to create custom diesel queries that aren’t wrapped by functions on the model structs.

Trait Implementations§

Formats the value using the given formatter. Read more
Converts to this type from the input type.
The associated error to be returned if derivation fails.
Derives an instance of Self from the incoming request metadata. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Converts self into a collection.
Convert self to an expression for Diesel’s query builder. Read more
Convert &self to an expression for Diesel’s query builder. Read more
Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Get the TypeId of this object.