pub struct FinalStage<'a> { /* private fields */ }
Expand description
The final builder stage, allowing configuration of optional paramters.
Implementations§
Source§impl<'a> FinalStage<'a>
impl<'a> FinalStage<'a>
Sourcepub fn thread_name_pattern(self, thread_name_pattern: &'a str) -> Self
pub fn thread_name_pattern(self, thread_name_pattern: &'a str) -> Self
Sets the pattern to be used when naming threads created to be part of the pool.
The substring {}
in the name will be replaced with an integer
identifier of the thread.
Defaults to None
.
Sourcepub fn on_drop_behavior(self, on_drop_behavior: OnPoolDropBehavior) -> Self
pub fn on_drop_behavior(self, on_drop_behavior: OnPoolDropBehavior) -> Self
Sets the behavior for what to do with pending scheduled executions when the pool is dropped.
Defaults to OnPoolDropBehavior::CompletePendingScheduled.
Sourcepub fn build(self) -> ScheduledThreadPool
pub fn build(self) -> ScheduledThreadPool
Consumes the builder, returning the constructed thread pool.
Auto Trait Implementations§
impl<'a> Freeze for FinalStage<'a>
impl<'a> RefUnwindSafe for FinalStage<'a>
impl<'a> Send for FinalStage<'a>
impl<'a> Sync for FinalStage<'a>
impl<'a> Unpin for FinalStage<'a>
impl<'a> UnwindSafe for FinalStage<'a>
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