efuse
A Rust library for software fuses.
This library provides boolean-like types that behave like software fuses: they can be "zapped" once, after which they remain in the toggled state forever. It supports fuses with custom initial boolean state, as well as atomic fuses.
Example
let initial_state = true;
let mut fuse = new;
assert_eq!;
fuse.zap;
assert_eq!;
assert_eq!;
fuse.zap;
assert_eq!;
let already_zapped = fuse.zap_once;
assert!;
License
Licensed under either of
- MIT license - http://opensource.org/licenses/MIT
- Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0
at your option.