pub struct Builder { /* private fields */ }
Implementations§
source§impl Builder
impl Builder
pub fn new() -> Self
pub fn name(self, name: impl Into<String>) -> Self
pub fn stack_size(self, stack_size: usize) -> Self
pub fn num_workers(self, num_workers: usize) -> Self
pub fn max_workers_count(self, max_workers_count: Option<usize>) -> Self
pub fn on_worker_panic(self, on_panic: fn()) -> Self
pub fn build(self) -> Result<ThreadPool>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Builder
impl RefUnwindSafe for Builder
impl Send for Builder
impl Sync for Builder
impl Unpin for Builder
impl UnwindSafe for Builder
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