pub trait RefClone: Clone {
    // Required method
    fn ref_clone(&self) -> Self;
}
Expand description

RefClone clone a shared reference, equivalent to Clone on e.g. Rc, Arc

Required Methods§

source

fn ref_clone(&self) -> Self

Clone a shared reference

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> RefClone for Rc<T>

source§

fn ref_clone(&self) -> Self

source§

impl<T> RefClone for Weak<T>

source§

fn ref_clone(&self) -> Self

source§

impl<T> RefClone for Arc<T>

source§

fn ref_clone(&self) -> Self

source§

impl<T> RefClone for Weak<T>

source§

fn ref_clone(&self) -> Self

Implementors§