Struct tokio_executor::SpawnError
source · [−]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
sourceimpl 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
sourceimpl Debug for SpawnError
impl Debug for SpawnError
sourceimpl Display for SpawnError
impl Display for SpawnError
sourceimpl Error for SpawnError
impl Error for SpawnError
sourcefn description(&self) -> &str
fn description(&self) -> &str
👎 Deprecated since 1.42.0:
use the Display impl or to_string()
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
Auto Trait Implementations
impl RefUnwindSafe for SpawnError
impl Send for SpawnError
impl Sync for SpawnError
impl Unpin for SpawnError
impl UnwindSafe for SpawnError
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more