IntoCloned

Trait IntoCloned 

Source
pub trait IntoCloned<T> {
    // Required methods
    fn clone_to(self, target: &mut T);
    fn into_cloned(self) -> T;
}
Expand description

Trait for generalization of Clone that can reuse an existing object.

Required Methods§

Source

fn clone_to(self, target: &mut T)

Moves an existing object or clones from a reference to the target object.

Source

fn into_cloned(self) -> T

Returns an existing object or a new clone from a reference.

Implementations on Foreign Types§

Source§

impl<T: Clone> IntoCloned<T> for &T

Source§

fn clone_to(self, target: &mut T)

Source§

fn into_cloned(self) -> T

Implementors§

Source§

impl<T> IntoCloned<T> for T