Registry / utility / on-drop

on-drop

JSON →
library0.1.2rscratesunverified

A utility crate providing a simple callback mechanism when a value goes out of scope.

# Cargo.toml [dependencies] on_drop = "0.1.2"
INSTALL
IMPORT
SIG · ON-DROP
O
on-drop
utilityrustv0.1.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.

OnDrop
use on_drop::OnDrop;

Create an OnDrop guard that prints a message when it goes out of scope.

use on_drop::OnDrop; let _guard = OnDrop::new(|| println!("Dropped!")); println!("Guard created");
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.1.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
on-drop — cargo add on-drop · libregistry