Struct r2d2::Pool [−][src]
pub struct Pool<M>(_)
where
M: ManageConnection;
Expand description
A generic connection pool.
Implementations
Creates a new connection pool with a default configuration.
Retrieves a connection from the pool.
Waits for at most the configured connection timeout before returning an error.
Retrieves a connection from the pool, waiting for at most timeout
The given timeout will be used instead of the configured connection timeout.
Attempts to retrieve a connection from the pool if there is one available.
Returns None
if there are no idle connections available in the pool.
This method will not block waiting to establish a new connection.
Returns if the pool is configured to test connections on check out.
Returns the configured maximum connection lifetime.
Returns the configured idle connection timeout.
Returns the configured connection timeout.
Trait Implementations
Returns a new Pool
referencing the same state as self
.
Auto Trait Implementations
impl<M> !RefUnwindSafe for Pool<M>
impl<M> !UnwindSafe for Pool<M>
Blanket Implementations
Mutably borrows from an owned value. Read more