pub enum EffectRuntimeError {
UnhandledEffect {
effect: String,
operation: String,
},
UnknownOperation {
effect: String,
operation: String,
},
MultipleResumeInClause {
operation: String,
},
NoDischarge {
operation: String,
},
ForwardWithoutOuterHandler {
effect: String,
},
Internal(String),
}Expand description
Errors raised at runtime by the effects FSM.
All variants are CT-1 (compiler-bug) or CT-2 (program-bug)
territory in the AXON blame calculus — the typechecker should
have caught any well-formedness issue before lowering. The runtime
surfaces them anyway so the FSM is operationally complete.
Variants§
UnhandledEffect
Performed an effect that has no enclosing handler in scope. Typechecker D9 should reject this statically; if it gets here the compiler has a bug.
UnknownOperation
Performed an operation that does not exist on the named effect.
MultipleResumeInClause
Handler clause invoked resume more than once on a single path.
Typechecker D10 should reject this statically.
NoDischarge
Handler clause finished without invoking resume / abort / forward. Typechecker D10 should reject this statically.
ForwardWithoutOuterHandler
forward invoked outside a handler clause body — same as a
regular perform with no handler.
Internal(String)
Generic dispatch error (panic-converted).
Trait Implementations§
Source§impl Debug for EffectRuntimeError
impl Debug for EffectRuntimeError
Source§impl Display for EffectRuntimeError
impl Display for EffectRuntimeError
Source§impl Error for EffectRuntimeError
impl Error for EffectRuntimeError
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()
Auto Trait Implementations§
impl Freeze for EffectRuntimeError
impl RefUnwindSafe for EffectRuntimeError
impl Send for EffectRuntimeError
impl Sync for EffectRuntimeError
impl Unpin for EffectRuntimeError
impl UnsafeUnpin for EffectRuntimeError
impl UnwindSafe for EffectRuntimeError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more