pub trait Freeze: Sized + Clone {
fn is_clone_cheap(&self) -> bool;
fn freeze(&mut self);
fn freezed(self) -> Self { ... }
}
Required Methods
sourcefn is_clone_cheap(&self) -> bool
fn is_clone_cheap(&self) -> bool
Returns true
if `Clone::clone is cheap.
Make `Clone::clone cheap.
Provided Methods
Call Self::freeze
and return self
.
Implementations on Foreign Types
sourceimpl<T> Freeze for Option<T>where
T: Freeze,
impl<T> Freeze for Option<T>where
T: Freeze,
fn is_clone_cheap(&self) -> bool
fn freeze(&mut self)
sourceimpl<T> Freeze for Vec<T>where
T: Freeze,
impl<T> Freeze for Vec<T>where
T: Freeze,
fn is_clone_cheap(&self) -> bool
fn freeze(&mut self)
sourceimpl<T> Freeze for Box<T>where
T: Freeze,
impl<T> Freeze for Box<T>where
T: Freeze,
fn freeze(&mut self)
fn is_clone_cheap(&self) -> bool
sourceimpl<T> Freeze for Cow<'_, T>where
T: Clone + Freeze,
impl<T> Freeze for Cow<'_, T>where
T: Clone + Freeze,
TODO(kdy1): This can be confusing.