You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[`Errable`](https://docs.rs/errable/latest/errable/enum.Errable.html) is an [`Option`](https://doc.rust-lang.org/stable/core/option/enum.Option.html) with inverted [`Try`](https://doc.rust-lang.org/stable/core/ops/trait.Try.html#)-semantics.
10
+
[`Fallible`](https://docs.rs/fallible-option/latest/fallible-option/enum.Fallible.html) is an [`Option`](https://doc.rust-lang.org/stable/core/option/enum.Option.html) with inverted [`Try`](https://doc.rust-lang.org/stable/core/ops/trait.Try.html#)-semantics.
11
11
12
-
What this means is that using the `?` operator on a `Errable<E>` will exit early
12
+
What this means is that using the `?` operator on a `Fallible<E>` will exit early
13
13
if an error `E` is contained within, or instead act as a no-op, if the value is `Success`.
14
14
15
15
This is in contrast to `Option` where using `?` on a `None`-value will exit early.
16
16
17
-
`Errable` fills the gap left by the [`Result`](https://doc.rust-lang.org/stable/core/result/enum.Result.html) and [`Option`](https://doc.rust-lang.org/stable/core/option/enum.Option.html) types:
17
+
`Fallible` fills the gap left by the [`Result`](https://doc.rust-lang.org/stable/core/result/enum.Result.html) and [`Option`](https://doc.rust-lang.org/stable/core/option/enum.Option.html) types:
18
18
19
19
| Potential Success | Potential Failure |
20
20
|---------------------|-------------------|
21
21
|`Result<T`|`, E>`|
22
-
|`Option<T>`|**`Errable<E>`**|
22
+
|`Option<T>`|**`Fallible<E>`**|
23
23
24
24
### Example
25
-
This code illustrates how `Errable` can be used to write succint
25
+
This code illustrates how `Fallible` can be used to write succint
26
26
validation code which exits early in case of failure.
0 commit comments