pub struct SendExecutorBuilder { /* private fields */ }
Expand description
A builder for SendExecutor
.
Implementations§
Source§impl SendExecutorBuilder
impl SendExecutorBuilder
Sourcepub fn num_threads(self, num_threads: u8) -> Self
pub fn num_threads(self, num_threads: u8) -> Self
Sets the number of threads for the executor.
Sourcepub fn worker_init(self, worker_init: impl Fn() + Send + Sync + 'static) -> Self
pub fn worker_init(self, worker_init: impl Fn() + Send + Sync + 'static) -> Self
Sets the worker initialization function.
Sourcepub fn instrument(self, instrument: Option<Arc<dyn TaskInstrument>>) -> Self
pub fn instrument(self, instrument: Option<Arc<dyn TaskInstrument>>) -> Self
Sets the instrumentation hook.
Sourcepub fn build(self) -> SendExecutor
pub fn build(self) -> SendExecutor
Builds the SendExecutor
, consuming this SendExecutorBuilder
.
Trait Implementations§
Source§impl Default for SendExecutorBuilder
impl Default for SendExecutorBuilder
Source§fn default() -> SendExecutorBuilder
fn default() -> SendExecutorBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SendExecutorBuilder
impl !RefUnwindSafe for SendExecutorBuilder
impl Send for SendExecutorBuilder
impl Sync for SendExecutorBuilder
impl Unpin for SendExecutorBuilder
impl !UnwindSafe for SendExecutorBuilder
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