pub struct HostPool {
pub name: String,
/* private fields */
}Expand description
Fields§
§name: StringThe name of the HostPool (for debugging purposes).
Implementations§
Source§impl HostPool
impl HostPool
Sourcepub fn new<N, F>(
name: N,
factory: F,
min_threads: usize,
max_threads: usize,
max_wait: Duration,
max_idle: Duration,
) -> Self
pub fn new<N, F>( name: N, factory: F, min_threads: usize, max_threads: usize, max_wait: Duration, max_idle: Duration, ) -> Self
Instantiate a new HostPool.
Sourcepub fn num_active_workers(&self) -> usize
pub fn num_active_workers(&self) -> usize
Get the current number of active workers.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HostPool
impl !RefUnwindSafe for HostPool
impl Send for HostPool
impl Sync for HostPool
impl Unpin for HostPool
impl !UnwindSafe for HostPool
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