pub struct NiPointer<T: RefCountable> { /* private fields */ }
Implementations§
Source§impl<T: RefCountable> NiPointer<T>
impl<T: RefCountable> NiPointer<T>
pub const fn new() -> Self
pub fn from_raw(ptr: *mut T) -> Self
pub fn reset(&mut self)
pub const fn is_null(&self) -> bool
pub const fn as_ptr(&self) -> Option<NonNull<T>>
pub fn as_ref<'a>(&self) -> Option<&'a T>
pub fn as_mut<'a>(&mut self) -> Option<&'a mut T>
Trait Implementations§
Source§impl<T: RefCountable> Clone for NiPointer<T>
impl<T: RefCountable> Clone for NiPointer<T>
Source§impl<T: RefCountable> Debug for NiPointer<T>
impl<T: RefCountable> Debug for NiPointer<T>
Source§impl<T: RefCountable> Default for NiPointer<T>
impl<T: RefCountable> Default for NiPointer<T>
Source§impl<T: RefCountable> Drop for NiPointer<T>
impl<T: RefCountable> Drop for NiPointer<T>
Source§impl<T: RefCountable> Hash for NiPointer<T>
impl<T: RefCountable> Hash for NiPointer<T>
Source§impl<T: RefCountable> PartialEq for NiPointer<T>
impl<T: RefCountable> PartialEq for NiPointer<T>
impl<T: RefCountable> Eq for NiPointer<T>
Auto Trait Implementations§
impl<T> Freeze for NiPointer<T>
impl<T> RefUnwindSafe for NiPointer<T>where
T: RefUnwindSafe,
impl<T> !Send for NiPointer<T>
impl<T> !Sync for NiPointer<T>
impl<T> Unpin for NiPointer<T>where
T: Unpin,
impl<T> UnwindSafe for NiPointer<T>where
T: UnwindSafe + 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