#try #control-flow #throw #no-std #catch

no-std try-blocks

macro to emulate the upcoming try block feature on stable

1 unstable release

Uses new Rust 2021

0.1.3 Jun 18, 2022
0.1.2 Jun 18, 2022
0.1.1 Jun 18, 2022
0.1.0 Jun 18, 2022

#788 in Rust patterns

30 downloads per month

MIT license

6KB
73 lines

try-blocks

Macro for stable try blocks that performs Ok-wrapping, and otherwise tries to achieve feature parity with RFC 1859. The macro is compatible with any type that implements the unstable Any trait through the use of type magic.

This crate is a fork of try-block, which has not been updated in four years at the time of writing this. This fork adds Ok-wrapping and the promise of future updates.

This crate is no_std compatible.

License: MIT


lib.rs:

Macro for stable try blocks that performs Ok-wrapping, and otherwise tries to achieve feature parity with RFC 1859. The macro is compatible with any type that implements the unstable Any trait through the use of type magic.

This crate is a fork of try-block, which has not been updated in four years at the time of writing this. This fork adds Ok-wrapping and the promise of future updates.

This crate is no_std compatible.

No runtime deps