pub enum SpawnError {
RuntimeUnavailable,
RegionNotFound(RegionId),
RegionClosed(RegionId),
LocalSchedulerUnavailable,
NameRegistrationFailed {
name: String,
reason: String,
},
RegionAtCapacity {
region: RegionId,
limit: usize,
live: usize,
},
AuthorizationDenied {
region: RegionId,
cx_id: String,
},
AdmissionSlotAlreadyReserved {
task_id: TaskId,
},
}Expand description
Errors that can occur when spawning a task.
Variants§
The runtime backing a weak handle has already been dropped.
RegionNotFound(RegionId)
The target region does not exist.
RegionClosed(RegionId)
The target region is closed or draining and cannot accept new tasks.
Local spawn attempted without an active worker-local scheduler.
NameRegistrationFailed
Named service registration failed during spawn.
RegionAtCapacity
The target region has reached its admission limit.
Fields
AuthorizationDenied
Authorization failed: caller lacks permission to create tasks in the target region.
Fields
AdmissionSlotAlreadyReserved
The one-shot canonical-identity slot was already reserved by another spawn request.
Implementations§
Source§impl SpawnError
impl SpawnError
Sourcepub const fn code(&self) -> &'static str
pub const fn code(&self) -> &'static str
Returns the stable machine-readable error code for this variant.
Codes are allocated from the ASUP-E00x range (core runtime spawn
errors) of the asupersync error-code registry and are stable across
releases: agents and tooling may match on them. The same code is
embedded as the leading [ASUP-ENNN] token of the Display
rendering.
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 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.