pub enum RuntimeError {
PoisonedLock(&'static str),
Abandoned(&'static str),
AlreadyCollected(&'static str),
}Expand description
Scheduler / host infrastructure error — not a bytecode flow fault.
Variants§
PoisonedLock(&'static str)
A Mutex was poisoned: another thread panicked while holding it.
Shared tables may be inconsistent; callers must not continue using them.
Abandoned(&'static str)
A flow was destroyed before it produced a crate::FlowOutcome, so
the completion value its handle was waiting for will never arrive.
Reachable when the runtime shuts down while a flow is suspended (in
the timer, in a worker deque, or parked in its mailbox): those flows
are dropped without reaching finish. The alternative to reporting
this is worse — a join() that blocks the embedder’s thread forever
with no way to tell “still running” from “never will”.
AlreadyCollected(&'static str)
The outcome was already collected by an earlier non-consuming
try_join / join_timeout, so there is nothing left to hand out.
Caller misuse rather than an infrastructure failure (kind A in the
table above), reported here because it shares join’s return type.
It exists so a second poll cannot be answered with Abandoned, which
would blame the runtime for destroying a flow that in fact completed
normally and was already observed.
Trait Implementations§
Source§impl Clone for RuntimeError
impl Clone for RuntimeError
Source§fn clone(&self) -> RuntimeError
fn clone(&self) -> RuntimeError
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 RuntimeError
impl Debug for RuntimeError
Source§impl Display for RuntimeError
impl Display for RuntimeError
impl Eq for RuntimeError
Source§impl Error for RuntimeError
impl Error for RuntimeError
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 RuntimeError
impl PartialEq for RuntimeError
impl StructuralPartialEq for RuntimeError
Auto Trait Implementations§
impl Freeze for RuntimeError
impl RefUnwindSafe for RuntimeError
impl Send for RuntimeError
impl Sync for RuntimeError
impl Unpin for RuntimeError
impl UnsafeUnpin for RuntimeError
impl UnwindSafe for RuntimeError
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.