pub enum ExecutorServiceBuilderError {
ZeroPoolSize,
ZeroMaximumPoolSize,
CorePoolSizeExceedsMaximum {
core_pool_size: usize,
maximum_pool_size: usize,
},
ZeroQueueCapacity,
ZeroStackSize,
ZeroKeepAlive,
SpawnWorker {
index: Option<usize>,
source: Error,
},
}Expand description
Error returned when an executor service cannot be built.
This error is shared by executor-service implementations whose construction may validate worker, queue, timeout, stack, or thread-spawn configuration.
Variants§
ZeroPoolSize
The configured fixed worker count is zero.
ZeroMaximumPoolSize
The configured maximum pool size is zero.
CorePoolSizeExceedsMaximum
The configured core pool size is greater than the maximum pool size.
Fields
ZeroQueueCapacity
The configured bounded queue capacity is zero.
ZeroStackSize
The configured worker stack size is zero.
ZeroKeepAlive
The configured keep-alive timeout is zero.
SpawnWorker
A worker thread could not be spawned.
Implementations§
Source§impl ExecutorServiceBuilderError
impl ExecutorServiceBuilderError
Sourcepub fn from_submission_error(error: SubmissionError) -> Self
pub fn from_submission_error(error: SubmissionError) -> Self
Trait Implementations§
Source§impl Debug for ExecutorServiceBuilderError
impl Debug for ExecutorServiceBuilderError
Source§impl Error for ExecutorServiceBuilderError
impl Error for ExecutorServiceBuilderError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for ExecutorServiceBuilderError
impl !RefUnwindSafe for ExecutorServiceBuilderError
impl Send for ExecutorServiceBuilderError
impl Sync for ExecutorServiceBuilderError
impl Unpin for ExecutorServiceBuilderError
impl UnsafeUnpin for ExecutorServiceBuilderError
impl !UnwindSafe for ExecutorServiceBuilderError
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