pub struct SpawnError { /* private fields */ }
Expand description
Errors returned by Executor::spawn
.
Spawn errors should represent relatively rare scenarios. Currently, the two
scenarios represented by SpawnError
are:
- An executor being at capacity or full. As such, the executor is not able to accept a new future. This error state is expected to be transient.
- An executor has been shutdown and can no longer accept new futures. This error state is expected to be permanent.
Implementations§
Source§impl SpawnError
impl SpawnError
Sourcepub fn at_capacity() -> Self
pub fn at_capacity() -> Self
Return a new SpawnError
reflecting an executor at capacity failure.
Sourcepub fn is_shutdown(&self) -> bool
pub fn is_shutdown(&self) -> bool
Returns true
if the error reflects a shutdown executor failure.
Sourcepub fn is_at_capacity(&self) -> bool
pub fn is_at_capacity(&self) -> bool
Returns true
if the error reflects an executor at capacity failure.
Trait Implementations§
Source§impl Debug for SpawnError
impl Debug for SpawnError
Source§impl Display for SpawnError
impl Display for SpawnError
Source§impl Error for SpawnError
impl Error for SpawnError
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.30.0 · 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
Auto Trait Implementations§
impl Freeze for SpawnError
impl RefUnwindSafe for SpawnError
impl Send for SpawnError
impl Sync for SpawnError
impl Unpin for SpawnError
impl UnwindSafe for SpawnError
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