#scope #macro #execution #go #delay #statement #expression

no-std defer

Utility to defer excecution of code, inspired by go's defer statement

3 unstable releases

0.2.1 Jan 29, 2024
0.2.0 Jan 25, 2024
0.1.0 Apr 2, 2018

#266 in Rust patterns

Download history 4595/week @ 2024-07-21 5066/week @ 2024-07-28 6929/week @ 2024-08-04 5839/week @ 2024-08-11 5403/week @ 2024-08-18 4846/week @ 2024-08-25 5571/week @ 2024-09-01 4392/week @ 2024-09-08 3475/week @ 2024-09-15 5170/week @ 2024-09-22 3261/week @ 2024-09-29 4430/week @ 2024-10-06 4296/week @ 2024-10-13 5242/week @ 2024-10-20 4940/week @ 2024-10-27 5462/week @ 2024-11-03

20,248 downloads per month
Used in 26 crates (12 directly)

MIT/Apache

7KB

crates.io docs.rs

defer

A small crate which provides the defer! macro, to delay execution of an expression until the end of the scope.

Consider using the scopeguard crate instead, which has many more features.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps