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§
source§impl SpawnError
impl SpawnError
sourcepub fn shutdown() -> SpawnError
pub fn shutdown() -> SpawnError
Return a new SpawnError
reflecting a shutdown executor failure.
sourcepub fn at_capacity() -> SpawnError
pub fn at_capacity() -> SpawnError
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)>
The lower-level source of this error, if any. Read more