pub unsafe trait CartablePointerLike: StableDeref + Sealed { }Expand description
An object fully representable by a non-null pointer.
§Safety
Implementer safety:
into_rawtransfers ownership of the values referenced by StableDeref to the caller, if there is ownership to transferdrop_rawreturns ownership back to the impl, if there is ownership to transferinto_rawmust not return the sentinel pointer
Note: the pointer NonNull<Self::Raw> may or may not be aligned and it should never
be dereferenced. Rust allows unaligned pointers; see std::ptr::read_unaligned.
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§
impl<'a, T> CartablePointerLike for &'a T
impl<T> CartablePointerLike for Box<T>
Available on crate feature
alloc only.impl<T> CartablePointerLike for Rc<T>
Available on crate feature
alloc only.impl<T> CartablePointerLike for Arc<T>
Available on crate feature
alloc only.