10 unstable releases (3 breaking)

Uses old Rust 2015

0.4.0 Jul 24, 2018
0.3.0 Jul 24, 2018
0.2.3 Aug 30, 2017
0.1.3 Mar 2, 2017
0.1.0 Oct 12, 2016

#1136 in Data structures

Download history 36/week @ 2023-10-29 11/week @ 2023-11-05 13/week @ 2023-11-12 13/week @ 2023-11-19 36/week @ 2023-11-26 38/week @ 2023-12-03 11/week @ 2023-12-10 21/week @ 2023-12-17 38/week @ 2023-12-24 6/week @ 2023-12-31 12/week @ 2024-01-07 8/week @ 2024-01-14 18/week @ 2024-01-21 27/week @ 2024-01-28 17/week @ 2024-02-04 46/week @ 2024-02-11

109 downloads per month
Used in oak

Apache-2.0

10KB
227 lines

Partial library

ptal on Travis CI

Similar to Option<T> with an additional Fake variant for accumulating errors beyond the first one. For example, in compiler, if a code analysis failed, we wish to continue a little further to obtain more errors.

Please consult the documentation.


lib.rs:

Partial is similar to Option where Value replaces Some and Nothing replaces None.

Similarly to Value, Fake contains a value of the right type that can be further used (e.g. in map or and_then) but this value is a dummy value used to be able to compute the rest and detect more errors. For any method, we have the ordering: Value > Fake > Nothing; a Fake value will never be a Value again.

Use case: When compiling, an error in one function must be reported but should not prevent the compilation of a second function to detect more errors in one run. This intermediate state is represented by Fake.

No runtime deps