crates.io
scopeguard
A RAII scope guard that will run a given closure when it goes out of scope, even if the code between panics (assuming unwinding panic). Defines the macros `defer!`, `defer_on_unwind!`, `defer_on_success!` as shorthands for guards with one of the implemented strategies.
Security
No known vulnerabilities in the OSV database as of the last sync.
Repository
https://github.com/bluss/scopeguard ↗Sourced from crates.io · Updated September 6, 2026
Package metadata from crates.io, the Rust community's crate registry.
View original source ↗Spot an error on this page? Let us know →FAQ
Common questions
What is scopeguard?
A RAII scope guard that will run a given closure when it goes out of scope, even if the code between panics (assuming unwinding panic). Defines the macros `defer!`, `defer_on_unwind!`, `defer_on_success!` as shorthands for guards with one of the implemented strategies.
Is scopeguard safe to use?
No known vulnerabilities in the OSV database as of the last sync.
What license does scopeguard use?
scopeguard does not specify a license.