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
AsUnsafeCell
must be safe to send and share between threads ifT
isSend
(it does not need to implementSend
orSync
)Self
andAsUnsafeCell
’sAsRef::as_ref
andAsMut::as_mut
implementations 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.