pub trait Pool: Debug {
    // Required methods
    fn set_min_size(&self, min_size: usize);
    fn get_min_size(&self) -> usize;
    fn get_running_size(&self) -> usize;
    fn set_max_size(&self, max_size: usize);
    fn get_max_size(&self) -> usize;
    fn set_keep_alive_time(&self, keep_alive_time: u64);
    fn get_keep_alive_time(&self) -> u64;
}
Expand description

The Pool abstraction.

Required Methods§

source

fn set_min_size(&self, min_size: usize)

Set the minimum number in this pool (the meaning of this number depends on the specific implementation).

source

fn get_min_size(&self) -> usize

Get the minimum number in this pool (the meaning of this number depends on the specific implementation).

source

fn get_running_size(&self) -> usize

Gets the number currently running in this pool.

source

fn set_max_size(&self, max_size: usize)

Set the maximum number in this pool (the meaning of this number depends on the specific implementation).

source

fn get_max_size(&self) -> usize

Get the maximum number in this pool (the meaning of this number depends on the specific implementation).

source

fn set_keep_alive_time(&self, keep_alive_time: u64)

Set the maximum idle time running in this pool. keep_alive_time has ns units.

source

fn get_keep_alive_time(&self) -> u64

Get the maximum idle time running in this pool. Returns in ns units.

Implementors§

source§

impl Pool for CoroutinePoolImpl<'_>

source§

impl<'p, HasCoroutinePoolImpl: HasCoroutinePool<'p> + Debug> Pool for HasCoroutinePoolImpl