Trait sync_ptr::FromConstPtr

source ·
pub trait FromConstPtr<T>: Sized {
    // Required methods
    unsafe fn as_sync_const(&self) -> SyncConstPtr<T>;
    unsafe fn as_send_const(&self) -> SendConstPtr<T>;
}

Required Methods§

source

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

Makes self immutable and Send+Sync

§Safety

self must be able to handle being sent to and used concurrently by other threads, or special care must be taken when using the wrapped self to not use it in any way in other threads.

source

unsafe fn as_send_const(&self) -> SendConstPtr<T>

Makes self immutable and Send

§Safety

self must be able to handle being sent to other threads or special care must be taken when using the wrapped self to not use it in any way in other threads.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

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

source§

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

source§

unsafe fn as_send_const(&self) -> SendConstPtr<T>

source§

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

source§

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

source§

unsafe fn as_send_const(&self) -> SendConstPtr<T>

Implementors§