Module core::clone [] [src]

The Clone`Clone` trait for types that cannot be 'implicitly copied'

In Rust, some simple types are "implicitly copyable" and when you assign them or pass them as arguments, the receiver will get a copy, leaving the original value in place. These types do not require allocation to copy and do not have finalizers (i.e. they do not contain owned boxes or implement Drop`Drop), so the compiler considers them cheap and safe to copy. For other types copies must be made explicitly, by convention implementing the`), so the compiler considers them cheap and safe to copy. For other types copies must be made explicitly, by convention implementing the Clone`Clonetrait and calling the` trait and calling the clone`clone` method.

Traits

Clone

A common trait for cloning an object.