Expand description
§Burn After Reading
§Description
A BAR (burn-after-reading) container works the following way:
- A value is contained & owned by the container.
- A best-effort attempt is made to
mlock(2)the value
- A best-effort attempt is made to
- The container is completely immutable (if you need to mutate the data, do so before inserting it in the container)
- The data contained is non-extractible (unless you transmute the container back to
Option<S>wink wink) - To read the data from it, you call
read, which returns you aBarGuardand empties theBarcontainer. - Once the
BarGuardis dropped, all the data gets zeroed out and dropped. Poof.munlock(2)also happens here
Compatible with WASM, but without any mlock/munlock because it doesn’t exist there (yet)!
§Documentation
Here: https://docs.rs/burn-after-reading
§AI Disclaimer
Unlike a lot of things being created currently, this library was written WITHOUT the use of any LLM.
§License
Licensed under either of these:
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)