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

type MutBox<'a, T, M = ()> = Mut<'a, Box<T, M>>;

Mutably dereferenceable 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 MutBox:

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

Move a value from a MutBox back to the stack by dereferencing:

let boxed = MutBox::new(5);
let value = *boxed;