pub struct NonZeroPtrMut<T: ?Sized + 'static>(/* private fields */);
Expand description
Wrapper type for pointers to get the non-zero optimization. When NonZero/Shared/Unique are stabilized, we should just use Shared here to get the same effect. Gankro is working on this in 1.
It’s unfortunate that this needs to infect all the caller types
with ’static. It would be nice to just use a &() and a PhantomData
Implementations§
Trait Implementations§
source§impl<T: ?Sized + 'static> Clone for NonZeroPtrMut<T>
impl<T: ?Sized + 'static> Clone for NonZeroPtrMut<T>
source§impl<T: ?Sized + 'static> Debug for NonZeroPtrMut<T>
impl<T: ?Sized + 'static> Debug for NonZeroPtrMut<T>
source§impl<T: Sized + 'static> Hash for NonZeroPtrMut<T>
impl<T: Sized + 'static> Hash for NonZeroPtrMut<T>
source§impl<T: ?Sized + 'static> PartialEq for NonZeroPtrMut<T>
impl<T: ?Sized + 'static> PartialEq for NonZeroPtrMut<T>
source§impl<T: ?Sized + 'static> Pointer for NonZeroPtrMut<T>
impl<T: ?Sized + 'static> Pointer for NonZeroPtrMut<T>
impl<T: ?Sized + 'static> Eq for NonZeroPtrMut<T>
Auto Trait Implementations§
impl<T> Freeze for NonZeroPtrMut<T>where
T: ?Sized,
impl<T> RefUnwindSafe for NonZeroPtrMut<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for NonZeroPtrMut<T>
impl<T> Sync for NonZeroPtrMut<T>
impl<T> Unpin for NonZeroPtrMut<T>where
T: ?Sized,
impl<T> !UnwindSafe for NonZeroPtrMut<T>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)