pub enum SpawnError {
BadFunction {
index: u32,
table_size: u32,
},
VerifyFailed(VerifyError),
InvalidCapability,
Unavailable,
FlowLimit {
current: usize,
max: u32,
},
SpawnDenied(String),
NameTaken {
name: String,
},
ThreadSpawnFailed(String),
VmInit(String),
}Expand description
User-facing spawn / load errors (category A in the taxonomy above).
These used to be .expect(...) panics on Runtime::new / spawn /
OS thread creation. Panic is reserved for bugs; a bad function index
or a refused thread::spawn is an embedder-visible failure and must
surface as Result so the host can recover without taking workers down.
Variants§
BadFunction
function index is outside the runtime chunk’s function table.
VerifyFailed(VerifyError)
Chunk failed verification before the runtime could start.
InvalidCapability
Spawn arguments contained an unknown or unusable capability.
Scheduler table poisoned (fail closed).
FlowLimit
Live flow count would exceed crate::RuntimeConfig::max_flows.
SpawnDenied(String)
Bytecode spawn failed the quota / SPAWN-right / attenuation check.
NameTaken
crate::ChildSpec::name is already in the runtime registry.
ThreadSpawnFailed(String)
OS refused to create a worker / timer / supervisor thread.
VmInit(String)
Vm::new failed for a reason other than a bad function index
(mapped from crate::Fault via From).
Trait Implementations§
Source§impl Clone for SpawnError
impl Clone for SpawnError
Source§fn clone(&self) -> SpawnError
fn clone(&self) -> SpawnError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SpawnError
impl Debug for SpawnError
Source§impl Display for SpawnError
impl Display for SpawnError
impl Eq for SpawnError
Source§impl Error for SpawnError
impl Error for SpawnError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Fault> for SpawnError
impl From<Fault> for SpawnError
Source§impl PartialEq for SpawnError
impl PartialEq for SpawnError
impl StructuralPartialEq for SpawnError
Auto Trait Implementations§
impl Freeze for SpawnError
impl RefUnwindSafe for SpawnError
impl Send for SpawnError
impl Sync for SpawnError
impl Unpin for SpawnError
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.