pub struct ConfigPoolBuilder(/* private fields */);
Expand description
Builder for ConfigPool
.
Implementations§
source§impl ConfigPoolBuilder
impl ConfigPoolBuilder
pub fn new(mode: Mode, config: Config) -> ConfigPoolBuilder
pub fn set_pool(&mut self, pool: VecDeque<Connection>) -> &mut ConfigPoolBuilder
sourcepub fn set_max_pool_size(
&mut self,
max_pool_size: usize,
) -> &mut ConfigPoolBuilder
pub fn set_max_pool_size( &mut self, max_pool_size: usize, ) -> &mut ConfigPoolBuilder
The maximum size of the underlying VecDeque
.
This is NOT the maximum connections that can be created.
When the number of connections created exceeds the max_pool_size
,
excess reclaimed connections are dropped instead of stored
in the pool.
pub fn build(self) -> Arc<ConfigPool>
Auto Trait Implementations§
impl !Freeze for ConfigPoolBuilder
impl RefUnwindSafe for ConfigPoolBuilder
impl Send for ConfigPoolBuilder
impl Sync for ConfigPoolBuilder
impl Unpin for ConfigPoolBuilder
impl UnwindSafe for ConfigPoolBuilder
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more