pub trait CloneFrom<T> {
// Required method
fn clone_from(other: &T) -> Self;
}Expand description
Construct a type from another by cloning its fields.
It is automatically implemented for any clonable type, i.e. CloneFrom<T> for T where
T: Clone.
Required Methods§
Sourcefn clone_from(other: &T) -> Self
fn clone_from(other: &T) -> Self
Constructs Self from another type by cloning its fields.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".