pub trait CloneFields<Target> {
    fn clone_into(&self) -> Target;
    fn clone_from(other: &Target) -> Self;
}
Expand description

A trait to clone a type into another type field-by-field.

It is automatically implemented for any clonable type, i.e. CloneFields<T> for T where T: Clone.

Refer to clone-fields-derive docs for info on how to automatically derive this trait. Yes, you typically don’t need to do it manually.

Required Methods

Clones self into another type by cloning its fields.

Constructs Self from another type by cloning its fields.

Implementors