pub trait CloneUnsafe {
// Required method
unsafe fn clone_unsafe(&self) -> Self;
}
Expand description
CloneUnsafe
is a trait that allows us to have the AliasTrackingRefCell
implement Clone
for that type. The clone_unsafe
method is unsafe because
it does not create an independent copy of the underlying type but instead
the returned value will be tracked like any other alias, and borrow-checking
rules will be enforced across both cells.
Required Methods§
unsafe fn clone_unsafe(&self) -> Self
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.