rc_refcell

Macro rc_refcell 

Source
macro_rules! rc_refcell {
    ($val:expr) => { ... };
}
Expand description

Macro for creating a Rc<RefCell<T>> from a value

ยงExample

use hurry::rc_refcell;
let x = rc_refcell!(5);
*x.borrow_mut() = 10;
assert_eq!(*x.borrow(), 10);