pub unsafe trait RangeMutexBackingStorage<T>: AsMut<[T]> + AsRef<[T]> {
type AsUnsafeCell: AsMut<[UnsafeCell<T>]> + AsRef<[UnsafeCell<T>]>;
// Required methods
fn into_unsafecell(self) -> Self::AsUnsafeCell;
fn from_unsafecell(value: Self::AsUnsafeCell) -> Self;
}Expand description
The trait for types which can be used as the backing store for a
RangeMutex.
§Safety
AsUnsafeCellmust be safe to send and share between threads ifTisSend(it does not need to implementSendorSync)SelfandAsUnsafeCell’sAsRef::as_refandAsMut::as_mutimplementations must be “well-behaved”, similar tostd::ops::DerefPure
Required Associated Types§
type AsUnsafeCell: AsMut<[UnsafeCell<T>]> + AsRef<[UnsafeCell<T>]>
Required Methods§
fn into_unsafecell(self) -> Self::AsUnsafeCell
fn from_unsafecell(value: Self::AsUnsafeCell) -> 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.