pub trait FromConstPtr<T>: Sized {
// Required methods
fn as_sync_const(&self) -> SyncConstPtr<T>;
fn as_send_const(&self) -> SendConstPtr<T>;
}Expand description
Helper trait for every *const T and *mut T to add fn’s to wrap it into a Sync/Send wrapper.
This trait does not need to be implemented directly.
Required Methods§
Sourcefn as_sync_const(&self) -> SyncConstPtr<T>
fn as_sync_const(&self) -> SyncConstPtr<T>
Makes self immutable and Send+Sync
Sourcefn as_send_const(&self) -> SendConstPtr<T>
fn as_send_const(&self) -> SendConstPtr<T>
Makes self immutable and Send
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.