Function std::cell::clone_ref [] [src]

pub fn clone_ref<T>(orig: &Ref<'b, T>) -> Ref<'b, T> where T: Clone
Unstable

: likely to be moved to a method, pending language changes

Copies a Ref`Ref`.

The RefCell`RefCell` is already immutably borrowed, so this cannot fail.

A Clone`Cloneimplementation would interfere with the widespread use of` implementation would interfere with the widespread use of r.borrow().clone()`r.borrow().clone()to clone the contents of a` to clone the contents of a RefCell`RefCell`.