Registry / utility / defer
library0.2.1rscratesunverified

Utility to defer execution of code, inspired by Go's defer statement.

# Cargo.toml [dependencies] defer = "0.2.1"
INSTALL
IMPORT
SIG · DEFER
D
defer
utilityrustv0.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

defer
use defer::defer;

Defers execution of a closure until the end of the scope.

use defer::defer; fn main() { defer(|| println!("world")); println!("hello"); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.2.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
defer — cargo add defer · libregistry