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 main
implements effect polymorphism over the fallibility effect by making use of theTermination
trait. It stands to reason that if we had atry
notation for functions, that it should be possible to writetry fn main
which desugars to aResult
type being returned.