pub enum RejectedExecution {
Shutdown,
Saturated,
WorkerSpawnFailed {
source: Arc<Error>,
},
}Expand description
Error returned when an executor service refuses to accept a task.
This error is about task acceptance only. It does not describe task execution success or failure; accepted tasks report their final result through the handle returned by the service.
Variants§
Shutdown
The service has been shut down and no longer accepts new tasks.
Saturated
The service is saturated and cannot accept more tasks.
WorkerSpawnFailed
The service accepted the task conceptually but could not create the worker thread required to execute it.
Trait Implementations§
Source§impl Clone for RejectedExecution
impl Clone for RejectedExecution
Source§fn clone(&self) -> RejectedExecution
fn clone(&self) -> RejectedExecution
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 RejectedExecution
impl Debug for RejectedExecution
Source§impl Display for RejectedExecution
impl Display for RejectedExecution
Source§impl Error for RejectedExecution
impl Error for RejectedExecution
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<RejectedExecution> for ThreadPoolBuildError
impl From<RejectedExecution> for ThreadPoolBuildError
Source§impl PartialEq for RejectedExecution
impl PartialEq for RejectedExecution
Source§fn eq(&self, other: &RejectedExecution) -> bool
fn eq(&self, other: &RejectedExecution) -> bool
impl Eq for RejectedExecution
Auto Trait Implementations§
impl Freeze for RejectedExecution
impl !RefUnwindSafe for RejectedExecution
impl Send for RejectedExecution
impl Sync for RejectedExecution
impl Unpin for RejectedExecution
impl UnsafeUnpin for RejectedExecution
impl !UnwindSafe for RejectedExecution
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