#macro #execution #statement #delay #expression #no-alloc #go

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

#253 in Rust patterns

Download history 2738/week @ 2023-12-23 2435/week @ 2023-12-30 3118/week @ 2024-01-06 3710/week @ 2024-01-13 4426/week @ 2024-01-20 3287/week @ 2024-01-27 3158/week @ 2024-02-03 2276/week @ 2024-02-10 3124/week @ 2024-02-17 4299/week @ 2024-02-24 3595/week @ 2024-03-02 3660/week @ 2024-03-09 5134/week @ 2024-03-16 4800/week @ 2024-03-23 3565/week @ 2024-03-30 3224/week @ 2024-04-06

17,465 downloads per month
Used in 11 crates (9 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