scopeguard

crates.io v1.2.0

8,723,053 weekly downloads · 0 Dependencies

No release in 2+ yearsZero dependencies

Source data as of:

Summary

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!, deferonunwind!, deferonsuccess! as shorthands for guards with one of the implemented strategies.

Install cargo add scopeguard

Registry values

Reproduced verbatim from the official registry, with the source named on each value.

Weekly downloads 8,723,053 Source: crates.io (Rust)
Releases 11 Last release: 2023-07-17 Source: crates.io (Rust)
Dependencies 0 Source: crates.io (Rust)

Description

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!, deferonunwind!, deferonsuccess! as shorthands for guards with one of the implemented strategies.

Registry-supplied description, cleaned to plain text. Source: crates.io (Rust).

Show original (raw) description
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.

Package details

Package
scopeguard
Registry
crates.io
Version
1.2.0
Weekly downloads
8,723,053 (weekly)
Dependencies
0
Releases
11
Last release
2023-07-17
First published
2015-04-30
Keywords
scope-guard, defer, panic, unwind
Repository
https://github.com/bluss/scopeguard

Why a field shows "—": A dash means the value is not published by the source registry for that package. Quanteta never fills in a guessed value — a missing field stays blank.

Derived indices (computation method published)

Quanteta-computed from the registry values below. This is a derived index, not a measured registry metric. See the formula on the Data & Sources page.

Q-Vitality Quanteta 52.7 / 100 Maintenance activity index (release cadence + download level).
Q-Trust Quanteta 25.9 / 100 Adoption / stability index (community size + download stability + age).
Q-Risk Quanteta 49.7 / 100 Dependency-surface index. Higher = more risk factors detected.

Data & Sources