Trait enso_prelude::CloneRef[][src]

pub trait CloneRef: Sized {
    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

fn clone_ref(&self) -> Self[src]

Loading content...

Implementations on Foreign Types

impl CloneRef for ()[src]

fn clone_ref(&self) -> Self[src]

impl CloneRef for f32[src]

fn clone_ref(&self) -> Self[src]

impl CloneRef for f64[src]

fn clone_ref(&self) -> Self[src]

impl CloneRef for i32[src]

fn clone_ref(&self) -> Self[src]

impl CloneRef for i64[src]

fn clone_ref(&self) -> Self[src]

impl CloneRef for u32[src]

fn clone_ref(&self) -> Self[src]

impl CloneRef for u64[src]

fn clone_ref(&self) -> Self[src]

impl CloneRef for usize[src]

fn clone_ref(&self) -> Self[src]

impl CloneRef for TypeId[src]

fn clone_ref(&self) -> Self[src]

impl CloneRef for JsValue[src]

fn clone_ref(&self) -> Self[src]

impl CloneRef for HtmlDivElement[src]

fn clone_ref(&self) -> Self[src]

impl CloneRef for HtmlElement[src]

fn clone_ref(&self) -> Self[src]

impl CloneRef for Performance[src]

fn clone_ref(&self) -> Self[src]

impl CloneRef for WebGl2RenderingContext[src]

fn clone_ref(&self) -> Self[src]

impl CloneRef for HtmlCanvasElement[src]

fn clone_ref(&self) -> Self[src]

impl CloneRef for EventTarget[src]

fn clone_ref(&self) -> Self[src]

Loading content...

Implementors

impl CloneRef for ImString[src]

fn clone_ref(&self) -> Self[src]

impl CloneRef for TraceCopies[src]

fn clone_ref(&self) -> Self[src]

impl<T> CloneRef for PhantomData<T>[src]

fn clone_ref(&self) -> Self[src]

impl<T: Clone> CloneRef for Immutable<T>[src]

fn clone_ref(&self) -> Self[src]

impl<T: CloneRef> CloneRef for CloneRefCell<T>[src]

fn clone_ref(&self) -> Self[src]

impl<T: ?Sized> CloneRef for Rc<T>[src]

fn clone_ref(&self) -> Self[src]

impl<T: ?Sized> CloneRef for Weak<T>[src]

fn clone_ref(&self) -> Self[src]

Loading content...