Trait ExternalClone

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

Helper trait for types which do not implement clone, but has a clone wrapper

Required Methods§

Source

fn external_clone(&self) -> Self

Clones the internal value

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> ExternalClone for &T

Source§

impl<T> ExternalClone for Ref<'_, T>

Source§

fn external_clone(&self) -> Ref<'_, T>

Source§

impl<T> ExternalClone for AtomicRef<'_, T>

Source§

fn external_clone(&self) -> AtomicRef<'_, T>

Implementors§