pub struct WorkerOptions {
pub concurrent_tasks: NonZeroUsize,
pub cancellation_timeout: Duration,
}
Expand description
Options for a Worker
.
Fields§
§concurrent_tasks: NonZeroUsize
The amount of concurrent tasks that can be spawned.
cancellation_timeout: Duration
The timeout after which a task is forcibly cancelled after receiving a cancellation request.
Trait Implementations§
Source§impl Clone for WorkerOptions
impl Clone for WorkerOptions
Source§fn clone(&self) -> WorkerOptions
fn clone(&self) -> WorkerOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for WorkerOptions
impl Debug for WorkerOptions
Auto Trait Implementations§
impl Freeze for WorkerOptions
impl RefUnwindSafe for WorkerOptions
impl Send for WorkerOptions
impl Sync for WorkerOptions
impl Unpin for WorkerOptions
impl UnwindSafe for WorkerOptions
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