Struct l337::Pool [−][src]
pub struct Pool<C: ManageConnection + Send> { /* fields omitted */ }
Expand description
General connection pool
Implementations
Creates a new connection pool
The returned future will resolve to the pool if successful, which can then be used immediately.
Returns a future that resolves to a connection from the pool.
If there are connections that are available to be used, the future will resolve immediately, otherwise, the connection will be in a pending state until a future is returned to the pool.
Timeout ability can be added to this method by calling connection_timeout
on the Config
.
Receive a connection back to be stored in the pool. This could have one of two outcomes:
- The connection will be passed to a waiting future, if any exist.
- The connection will be put back into the connection pool.
The total number of connections in the pool.
The number of idle connections in the pool.
The number of errors when the connection push back to the pool.
Trait Implementations
Returns a new Pool
referencing the same state as self
.
Auto Trait Implementations
impl<C> !RefUnwindSafe for Pool<C>
impl<C> !UnwindSafe for Pool<C>
Blanket Implementations
Mutably borrows from an owned value. Read more
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