diff options
author | Wedson Almeida Filho <wedsonaf@gmail.com> | 2023-01-30 03:44:00 -0300 |
---|---|---|
committer | Miguel Ojeda <ojeda@kernel.org> | 2023-02-01 00:14:01 +0100 |
commit | 4d4692a2ff836487c17960a6211a4cce7094f09c (patch) | |
tree | 1e4d1feb8d391448da47343301d8f8a83674cacf /rust/kernel/lib.rs | |
parent | dec1df547d812a5ced4de29e7eadcfa0484bec1e (diff) | |
download | linux-4d4692a2ff836487c17960a6211a4cce7094f09c.tar.gz linux-4d4692a2ff836487c17960a6211a4cce7094f09c.tar.bz2 linux-4d4692a2ff836487c17960a6211a4cce7094f09c.zip |
rust: types: introduce `ScopeGuard`
This allows us to run some code when the guard is dropped (e.g.,
implicitly when it goes out of scope). We can also prevent the
guard from running by calling its `dismiss()` method.
Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com>
Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
Reviewed-by: Andreas Hindborg <a.hindborg@samsung.com>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel/lib.rs')
0 files changed, 0 insertions, 0 deletions