FromConstPtr

Trait FromConstPtr 

Source
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§

Source

fn as_sync_const(&self) -> SyncConstPtr<T>

Makes self immutable and Send+Sync

Source

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.

Implementations on Foreign Types§

Source§

impl<T> FromConstPtr<T> for *const T

Source§

impl<T> FromConstPtr<T> for *mut T

Implementors§