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]

[src]

Constructs a new Builder.

Parameters are initialized with their default values.

[src]

Sets pool_size.

Panics

Panics if pool_size is 0.

[src]

Sets min_idle.

[src]

Sets helper_threads.

Ignored if thread_pool is Some.

Panics

Panics if helper_threads is 0.

[src]

Sets the thread_pool.

[src]

Sets test_on_check_out.

[src]

Sets initialization_fail_fast.

[src]

Sets max_lifetime.

Panics

Panics if max_lifetime is the zero Duration.

[src]

Sets idle_timeout.

Panics

Panics if idle_timeout is the zero Duration.

[src]

Sets connection_timeout to the specified duration.

Panics

Panics if connection_timeout is the zero duration

[src]

Sets the error_handler.

[src]

Sets the connection_customizer.

[src]

Consumes the Builder, turning it into a Config.

Panics

Panics if min_idle is larger than pool_size.

Trait Implementations

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

[src]

Formats the value using the given formatter.