Struct l337::Pool[][src]

pub struct Pool<C: ManageConnection + Send> { /* fields omitted */ }
Expand description

General connection pool

Implementations

Minimum number of connections in the pool.

Maximum possible number of connections in the pool.

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.

The number of waiters for the next available connections.

Trait Implementations

Returns a new Pool referencing the same state as self.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

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.

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