pub struct FinalStage<'a> { /* private fields */ }
Expand description

The final builder stage, allowing configuration of optional paramters.

Implementations§

source§

impl<'a> FinalStage<'a>

source

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.

source

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.

source

pub fn build(self) -> ScheduledThreadPool

Consumes the builder, returning the constructed thread pool.

Auto Trait Implementations§

§

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> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.