#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

#282 in Rust patterns

Download history 5925/week @ 2024-08-10 5293/week @ 2024-08-17 4852/week @ 2024-08-24 5677/week @ 2024-08-31 4277/week @ 2024-09-07 3648/week @ 2024-09-14 5139/week @ 2024-09-21 3312/week @ 2024-09-28 4368/week @ 2024-10-05 4291/week @ 2024-10-12 5296/week @ 2024-10-19 4846/week @ 2024-10-26 5233/week @ 2024-11-02 5328/week @ 2024-11-09 4780/week @ 2024-11-16 5493/week @ 2024-11-23

21,512 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