Expand description
Atomically destroyable types.
§Examples
let value = AtomicDestroy::new(Box::new(5));
assert_eq!(**value.get().unwrap(), 5);
value.destroy();
// The Box's destructor is run here.
assert!(value.get().is_none());
Structs§
- Atomic
Destroy - An atomically destroyable value.
- Value
- A “locked” value of an
AtomicDestroy
. While one of these exists the value inside theAtomicDestroy
is guaranteed not to be dropped.