#expect #unwrap #error #error-handling #result

meticulous

Result extension to add more meaning to unwrapping

3 unstable releases

0.2.0-pre.1 Apr 8, 2023
0.1.0 Oct 9, 2022

#2361 in Rust patterns

Download history 3490/week @ 2024-07-21 2738/week @ 2024-07-28 2855/week @ 2024-08-04 3720/week @ 2024-08-11 2998/week @ 2024-08-18 2442/week @ 2024-08-25 3307/week @ 2024-09-01 1915/week @ 2024-09-08 2145/week @ 2024-09-15 1547/week @ 2024-09-22 2288/week @ 2024-09-29 1882/week @ 2024-10-06 1061/week @ 2024-10-13 2247/week @ 2024-10-20 2636/week @ 2024-10-27 903/week @ 2024-11-03

6,895 downloads per month

MIT/Apache

12KB
104 lines

Meticulous - better unwrapping

crates.io Documentation MIT/Apache-2 licensed CI

[dependencies]
melticulous = "0.1.0"

This crate provides extensions to Result type with additional unwrapping methods, which have more meaning compared to standard expect and unwrap.

Different "unwrapping" cases may have different meaning. Some of them need to be fixed later, others don't. You may also want to easily find different types of unwrapping using a simple code search. Using different unwrapping methods from this crate helps writing and maintaining the code.

todo

At the early stage, you don't want to care about handling all the errors, happy-path scenarios may be enough. todo can be used in such cases.

assured

assured can be used when you are sure that Result will never fail. For example, some type conversions is never intend to fail on operating system you target.

verified

Sometimes you check all conditions which may lead to failure, before doing the particular operation. In this case verified can be used.

No runtime deps