Struct r2d2::config::Builder [] [src]

pub struct Builder<C, E> { /* fields omitted */ }

A builder for Config.

See the documentation of Config for more details about the default value and meaning of the configuration parameters.

Methods

impl<C, E: Error> Builder<C, E>
[src]

Constructs a new Builder.

Parameters are initialized with their default values.

Sets pool_size.

Panics

Panics if pool_size is 0.

Sets min_idle.

Sets helper_threads.

Panics

Panics if helper_threads is 0.

Sets test_on_check_out.

Sets initialization_fail_fast.

Sets max_lifetime.

Panics

Panics if max_lifetime is the zero Duration.

Sets idle_timeout.

Panics

Panics if idle_timeout is the zero Duration.

Sets connection_timeout to the specified duration.

Panics

Panics if connection_timeout is the zero duration

Sets the error_handler.

Sets the connection_customizer.

Consumes the Builder, turning it into a Config.

Panics

Panics if min_idle is larger than pool_size.

Trait Implementations

impl<C: Debug, E: Debug> Debug for Builder<C, E>
[src]

Formats the value using the given formatter.