[][src]Type Definition swim_mem::lease::HardBox

type HardBox<'a, T, M = ()> = Hard<'a, Box<T, M>>;

Undereferenceable strong owner of a value stored in a Hold-allocated, atomically reference counted memory block.

Examples

Move a value from the stack to the global hold by creating a HardBox:

let value = 5;
let boxed = HardBox::new(value);

Move a value from a HardBox back to the stack by unwrapping it:

let boxed = HardBox::new(5);
let value = boxed.unwrap();