pub struct WorkerPool<W, F>where
W: Worker,
F: WorkerFactory<W>,{ /* private fields */ }Implementations§
Source§impl<W, F> WorkerPool<W, F>where
W: Worker,
F: WorkerFactory<W>,
impl<W, F> WorkerPool<W, F>where
W: Worker,
F: WorkerFactory<W>,
pub fn new(max_count: u16, factory: F) -> Arc<WorkerPool<W, F>>
pub async fn get_worker( self: &Arc<WorkerPool<W, F>>, ) -> Result<WorkerGuard<W, F>, Error<PoolErrorCode>>
pub async fn clear_all_worker(&self)
Auto Trait Implementations§
impl<W, F> !Freeze for WorkerPool<W, F>
impl<W, F> RefUnwindSafe for WorkerPool<W, F>where
F: RefUnwindSafe,
impl<W, F> Send for WorkerPool<W, F>
impl<W, F> Sync for WorkerPool<W, F>
impl<W, F> Unpin for WorkerPool<W, F>where
W: Unpin,
impl<W, F> UnwindSafe for WorkerPool<W, F>where
F: RefUnwindSafe,
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