#error #adapter #capabilities #extending #error-handling #combinator #options

lifterr

A small set of adapters extending Rust's error-handling capabilities

6 releases (3 breaking)

0.4.1 Nov 20, 2022
0.4.0 Nov 20, 2022
0.3.1 Jun 5, 2022
0.2.0 May 17, 2022
0.1.0 Feb 15, 2022

#2071 in Rust patterns

MIT license

13KB
183 lines

lifterr

A small set of adapters extending Rust's error-handling capabilities.

github crates.io docs.rs

Option

Rust's Option ships with a suite of combinators meant to ease common tasks requiring handling optionality safely.

This library extends it with a little extra set of capabilities as defined in the OptionExt<A> trait.

Result

Rust's Result ships with a suite of combinators meant to ease common tasks requiring handling failure safely.

This library extends it with a little extra set of capabilities as defined in the ResultExt<A, E> trait.

Moreover, it's offered convenient functions to lift values into successful or failed results with the traits IntoOk<O> and IntoErr<E>, respectively.

No runtime deps