Fallibility (Scoped Effect)
Feature Status
todo
Description
todo
Refinements
| Modifier | Description |
|---|---|
Option<T> | Used to describe optional values |
Result<T, E> | Used to describe errors or success values |
ControlFlow<B, C> | Used to represent control-flow loops |
Poll<T> | Used to describe the state of Future state machines |
While the reification of the fallibility effect in bounds ought to be impl Try, it more commonly is the case that we see concrete types used.
Feature categorization
| Position | Syntax |
|---|---|
| Effect | try |
| Yield | throw |
| Apply | ? |
| Consume | match / fn main() † |
| Reification | impl Try |
†
fn mainimplements effect polymorphism over the fallibility effect by making use of theTerminationtrait. It stands to reason that if we had atrynotation for functions, that it should be possible to writetry fn mainwhich desugars to aResulttype being returned.