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

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

#2353 in Rust patterns

Download history 528/week @ 2023-12-11 566/week @ 2023-12-18 365/week @ 2023-12-25 580/week @ 2024-01-01 678/week @ 2024-01-08 648/week @ 2024-01-15 452/week @ 2024-01-22 759/week @ 2024-01-29 972/week @ 2024-02-05 654/week @ 2024-02-12 1936/week @ 2024-02-19 2430/week @ 2024-02-26 2469/week @ 2024-03-04 1268/week @ 2024-03-11 1117/week @ 2024-03-18 758/week @ 2024-03-25

5,665 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