Registry / utility / dispose

dispose

JSON →
library0.5.2rscratesunverified

A simple wrapper for values that must be consumed on drop.

# Cargo.toml [dependencies] dispose = "0.5.2"
INSTALL
IMPORT
SIG · DISPOSE
D
dispose
utilityrustv0.5.2
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.

Dispose
✓ use dispose::Dispose;

Wrap a value with a drop handler that runs when the wrapper is dropped.

use dispose::Dispose; let guarded = Dispose::new(vec![1, 2, 3], |v| { println!("Dropping vector with {} elements", v.len()); }); // guarded goes out of scope, closure runs
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.5.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
dispose — cargo add dispose · libregistry