Trait enso_prelude::CloneRef[][src]

pub trait CloneRef: Sized + Clone {
    fn clone_ref(&self) -> Self;
}
Expand description

Clone for internal-mutable structures. This trait can be implemented only if mutating one structure will be reflected in all of its clones. Please note that it does not mean that all the fields needs to provide internal mutability as well. For example, a structure can remember it’s creation time and store it as f32. As long as it cannot be mutated, the structure can implement CloneRef. In order to guide the auto-deriving mechanism, it is advised to wrap all immutable fields in the Immutable newtype.

Required methods

Implementations on Foreign Types

Implementors