Struct sea_orm_rocket::Connection [−][src]
pub struct Connection<'a, D: Database>(_);Expand description
A request guard which retrieves a single connection to a Database.
For a database type of Db, a request guard of Connection<Db> retrieves a
single connection to Db.
The request guard succeeds if the database was initialized by the
Initializer fairing and a connection is available within
connect_timeout seconds.
- If the
Initializerfairing was not attached, the guard fails with statusInternalServerError. ASentinelguards this condition, and so this type of failure is unlikely to occur. ANoneerror is returned. - If a connection is not available within
connect_timeoutseconds or another error occurs, the gaurd fails with statusServiceUnavailableand the error is returned inSome.
Implementations
Returns the internal connection value. See the Connection Deref
column for the expected type of this value.
Trait Implementations
The associated error to be returned if derivation fails.
Auto Trait Implementations
impl<'a, D> RefUnwindSafe for Connection<'a, D> where
<<D as Database>::Pool as Pool>::Connection: RefUnwindSafe,
impl<'a, D> Send for Connection<'a, D> where
<<D as Database>::Pool as Pool>::Connection: Sync,
impl<'a, D> Sync for Connection<'a, D> where
<<D as Database>::Pool as Pool>::Connection: Sync,
impl<'a, D> Unpin for Connection<'a, D>
impl<'a, D> UnwindSafe for Connection<'a, D> where
<<D as Database>::Pool as Pool>::Connection: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
pub fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
pub fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
Converts self into a collection.
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more
