pub enum Raised {
Error(Value),
NoMatch(Value),
}Expand description
A value unwinding through the single error channel (see the errors section
of docs/elly-spec.md). Evaluation returns Result<Value, Raised>; a raise
unwinds the ? chain up to the nearest boundary. Two kinds unwind
together, differing only in what catches them:
Error(v)— a genuine failure: a host abort (raise_sym) or an explicit__Err.raise v. Propagates past__match.NoMatch(v)— a pattern refutation produced bymatch_patternon a structural miss.vis the original descriptive error the refutation stands for (e.g..list_size_mismatch, or.no_matchfor a bare=/asmiss). Only__matchsingles it out — catching it, discardingv, and falling through to its fallback. Every other boundary (__Err.catch, the top level) treats it exactly asError(v), so an uncaught refutation surfaces as its original errorvrather than an opaque signal.
The kinds are distinguished by construction, not by an inspectable tag: user
code only ever raises Error (via __Err.raise), so it cannot forge a
NoMatch and fool __match (unlike a bare .no_match symbol would).
Variants§
Error(Value)
A genuine error, propagated by __match.
NoMatch(Value)
A pattern refutation carrying the original error it decays to when uncaught.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Raised
impl !RefUnwindSafe for Raised
impl !Send for Raised
impl !Sync for Raised
impl Unpin for Raised
impl UnsafeUnpin for Raised
impl !UnwindSafe for Raised
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
Mutably borrows from an owned value. Read more