Struct bb8::Pool[][src]

pub struct Pool<M> where
    M: ManageConnection
{ /* fields omitted */ }
Expand description

A generic connection pool.

Implementations

Returns a Builder instance to configure a new pool.

Returns information about the current state of the pool.

Retrieves a connection from the pool.

Retrieves an owned connection from the pool

Using an owning PooledConnection makes it easier to leak the connection pool. Therefore, Pool::get (which stores a lifetime-bound reference to the pool) should be preferred whenever possible.

Get a new dedicated connection that will not be managed by the pool. An application may want a persistent connection (e.g. to do a postgres LISTEN) that will not be closed or repurposed by the pool.

This method allows reusing the manager’s configuration but otherwise bypassing the pool

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. 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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.