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,
) -> ExecutorServiceBuilderError
pub fn from_submission_error( error: SubmissionError, ) -> ExecutorServiceBuilderError
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()
Source§impl From<ExecutorServiceBuilderError> for ExecutionServicesBuildError
impl From<ExecutorServiceBuilderError> for ExecutionServicesBuildError
Source§fn from(source: ExecutorServiceBuilderError) -> Self
fn from(source: ExecutorServiceBuilderError) -> Self
Converts to this type from the input type.
Source§impl From<SubmissionError> for ExecutorServiceBuilderError
impl From<SubmissionError> for ExecutorServiceBuilderError
Source§fn from(error: SubmissionError) -> ExecutorServiceBuilderError
fn from(error: SubmissionError) -> ExecutorServiceBuilderError
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
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<E> IntoBoxError for E
impl<E> IntoBoxError for E
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more