Trait RefClonable

Source
pub trait RefClonable {
    // Required method
    fn refc(&self) -> Self;
}
Expand description

Clone function but only does cheap ref-cloning like rc

Required Methods§

Source

fn refc(&self) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T> RefClonable for Box<T>
where T: RefClonable,

Source§

fn refc(&self) -> Self

Source§

impl<T> RefClonable for Rc<T>
where T: ?Sized,

Source§

fn refc(&self) -> Self

Source§

impl<T> RefClonable for Arc<T>
where T: ?Sized,

Source§

fn refc(&self) -> Self

Implementors§