Trait MixedClone

Source
pub trait MixedClone<S: Speed>: Sized {
    // Required method
    fn mixed_clone(&self) -> Self;
}
Expand description

Get clones that could share some but not all semantically-important mutable state.

This marker is useful for cases where a user needs to check documentation to figure out what happens.

It is not strictly necessary that the clone function doesn’t behave like IndependentClone::independent_clone or MirroredClone::mirrored_clone, but this type is not a catch-all for “some sort of clone, maybe also implements IndependentClone or MirroredClone”.

This crate will provide a better tool for abstracting over all three modes of cloning provided. It just isn’t provided yet. This isn’t it.

Required Methods§

Source

fn mixed_clone(&self) -> Self

Get a clone that could share some but not all semantically-important mutable state.

Exact behavior is very implementation-dependent.

Read MixedClone for more.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<S: Speed, T: ?Sized + ToOwned> MixedClone<S> for Cow<'_, T>

Source§

fn mixed_clone(&self) -> Self

Source§

impl<T> MixedClone<NearInstant> for AtomicPtr<T>

Source§

fn mixed_clone(&self) -> Self

Source§

impl<T: ?Sized> MixedClone<NearInstant> for *const T

Source§

fn mixed_clone(&self) -> Self

Source§

impl<T: ?Sized> MixedClone<NearInstant> for *mut T

Source§

fn mixed_clone(&self) -> Self

Source§

impl<T: ?Sized> MixedClone<NearInstant> for &T

Source§

fn mixed_clone(&self) -> Self

Source§

impl<T: ?Sized> MixedClone<NearInstant> for NonNull<T>

Source§

fn mixed_clone(&self) -> Self

Implementors§