[−][src]Type Definition swim_mem::lease::RefBox
type RefBox<'a, T, M = ()> = Ref<'a, Box<T, M>>;
Immutably 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 RefBox
:
let value = 5; let boxed = RefBox::new(value);
Move a value from a RefBox
back to the stack by dereferencing:
let boxed = RefBox::new(5); let value = *boxed;