pub trait RawPtr:
Ptr
+ Sized
+ Copy {
// Provided methods
fn cast<U>(self) -> *const U { ... }
fn cast_mut(self) -> *mut Self::Target { ... }
}Expand description
Marker trait identifying raw pointers.
Provided Methods§
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<T: ?Sized> RawPtr for *const T
impl<T: ?Sized> RawPtr for *mut T
impl<T: ?Sized> RawPtr for NonNull<T>
impl<T: ?Sized> RawPtr for NonNullConst<T>
Available on crate feature
non_null_const only.