pub struct SyncPtr<T>(/* private fields */);
Implementations§
Source§impl<T> SyncPtr<T>
impl<T> SyncPtr<T>
pub fn new(val: T) -> Self
pub fn raw(ptr: *const T) -> Self
pub fn null() -> Self
pub fn ptr(&self) -> *const T
pub fn is_null(&self) -> bool
pub fn as_void(self) -> SyncPtr<Void>
pub unsafe fn as_ref(&self) -> Option<&T>
pub unsafe fn as_mut(&mut self) -> Option<&mut T>
pub unsafe fn take(&mut self) -> T
Trait Implementations§
impl<T: Send> Send for SyncPtr<T>
impl<T: Sync> Sync for SyncPtr<T>
Auto Trait Implementations§
impl<T> Freeze for SyncPtr<T>
impl<T> RefUnwindSafe for SyncPtr<T>where
T: RefUnwindSafe,
impl<T> Unpin for SyncPtr<T>
impl<T> UnwindSafe for SyncPtr<T>where
T: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more