Struct ThreadBuilder

struct ThreadBuilder { ... }

Thread builder used for customization via ThreadPoolBuilder::spawn_handler.

Implementations

impl ThreadBuilder

fn index(self: &Self) -> usize

Gets the index of this thread in the pool, within 0..num_threads.

fn name(self: &Self) -> Option<&str>

Gets the string that was specified by ThreadPoolBuilder::name().

fn stack_size(self: &Self) -> Option<usize>

Gets the value that was specified by ThreadPoolBuilder::stack_size().

fn run(self: Self)

Executes the main loop for this thread. This will not return until the thread pool is dropped.

impl Debug for ThreadBuilder

fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result

impl Freeze for ThreadBuilder

impl RefUnwindSafe for ThreadBuilder

impl Send for ThreadBuilder

impl Sync for ThreadBuilder

impl Unpin for ThreadBuilder

impl UnsafeUnpin for ThreadBuilder

impl UnwindSafe for ThreadBuilder

impl<T> Any for ThreadBuilder

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for ThreadBuilder

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for ThreadBuilder

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

impl<T> From for ThreadBuilder

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> Pointable for ThreadBuilder

unsafe fn init(init: <T as Pointable>::Init) -> usize
unsafe fn deref<'a>(ptr: usize) -> &'a T
unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
unsafe fn drop(ptr: usize)

impl<T, U> Into for ThreadBuilder

fn into(self: Self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom for ThreadBuilder

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

impl<T, U> TryInto for ThreadBuilder

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