Trait DeepClone

Source
pub trait DeepClone: Sized {
    // Required method
    fn deep_clone(&self) -> Self;

    // Provided method
    fn deep_clone_from(&mut self, source: &Self) { ... }
}

Required Methods§

Source

fn deep_clone(&self) -> Self

Provided Methods§

Source

fn deep_clone_from(&mut self, source: &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 DeepClone for f32

Source§

fn deep_clone(&self) -> Self

Source§

impl DeepClone for f64

Source§

fn deep_clone(&self) -> Self

Source§

impl DeepClone for i8

Source§

fn deep_clone(&self) -> Self

Source§

impl DeepClone for i16

Source§

fn deep_clone(&self) -> Self

Source§

impl DeepClone for i32

Source§

fn deep_clone(&self) -> Self

Source§

impl DeepClone for i64

Source§

fn deep_clone(&self) -> Self

Source§

impl DeepClone for i128

Source§

fn deep_clone(&self) -> Self

Source§

impl DeepClone for u8

Source§

fn deep_clone(&self) -> Self

Source§

impl DeepClone for u16

Source§

fn deep_clone(&self) -> Self

Source§

impl DeepClone for u32

Source§

fn deep_clone(&self) -> Self

Source§

impl DeepClone for u64

Source§

fn deep_clone(&self) -> Self

Source§

impl DeepClone for u128

Source§

fn deep_clone(&self) -> Self

Source§

impl<K: DeepClone + Hash + Eq, V: DeepClone> DeepClone for HashMap<K, V>

Source§

fn deep_clone(&self) -> Self

Source§

fn deep_clone_from(&mut self, other: &Self)

Source§

impl<T: DeepClone + Hash + Eq> DeepClone for HashSet<T>

Source§

fn deep_clone(&self) -> Self

Source§

fn deep_clone_from(&mut self, other: &Self)

Source§

impl<T: DeepClone> DeepClone for Rc<T>

Source§

fn deep_clone(&self) -> Self

Source§

impl<T: DeepClone> DeepClone for Arc<T>

Source§

fn deep_clone(&self) -> Self

Source§

impl<T: DeepClone> DeepClone for Vec<T>

Source§

fn deep_clone(&self) -> Self

Source§

fn deep_clone_from(&mut self, source: &Self)

Source§

impl<T: DeepClone> DeepClone for Mutex<T>

Source§

fn deep_clone(&self) -> Self

Source§

fn deep_clone_from(&mut self, source: &Self)

Implementors§