[−][src]Struct safer_ffi::ptr::NonNullOwned
Implementations
impl<T> NonNullOwned<T>
[src]
pub fn as_ptr(&self) -> *const T
[src]
pub fn cast<U>(self: NonNullOwned<T>) -> NonNullOwned<U>
[src]
impl<T> NonNullOwned<T>
[src]
pub fn as_mut_ptr(&mut self) -> *mut T
[src]
pub fn copy(self: &mut NonNullOwned<T>) -> NonNullOwned<T>
[src]
impl<__> NonNullOwned<__>
[src]
pub unsafe fn dealloc<T>(self)
[src]
This is supported on
feature="alloc"
only.pub unsafe fn drop_in_place_and_dealloc<T>(self)
[src]
This is supported on
feature="alloc"
only.pub unsafe fn drop_in_place<T>(self)
[src]
Methods from Deref<Target = NonNull<T>>
pub unsafe fn as_ref(&self) -> &T
1.25.0[src]
Dereferences the content.
The resulting lifetime is bound to self so this behaves "as if"
it were actually an instance of T that is getting borrowed. If a longer
(unbound) lifetime is needed, use &*my_ptr.as_ptr()
.
pub unsafe fn as_mut(&mut self) -> &mut T
1.25.0[src]
Mutably dereferences the content.
The resulting lifetime is bound to self so this behaves "as if"
it were actually an instance of T that is getting borrowed. If a longer
(unbound) lifetime is needed, use &mut *my_ptr.as_ptr()
.
Trait Implementations
impl<T> Debug for NonNullOwned<T>
[src]
fn fmt(self: &NonNullOwned<T>, fmt: &mut Formatter) -> Result
[src]
impl<T> Deref for NonNullOwned<T>
[src]
type Target = NonNull<T>
The resulting type after dereferencing.
fn deref(self: &NonNullOwned<T>) -> &NonNull<T>
[src]
impl<T> DerefMut for NonNullOwned<T>
[src]
fn deref_mut(self: &mut NonNullOwned<T>) -> &mut NonNull<T>
[src]
impl<T> From<NonNull<T>> for NonNullOwned<T>
[src]
impl<T: ReprC> ReprC for NonNullOwned<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for NonNullOwned<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<T> !Send for NonNullOwned<T>
impl<T> !Sync for NonNullOwned<T>
impl<T> Unpin for NonNullOwned<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for NonNullOwned<T> where
T: RefUnwindSafe + UnwindSafe,
T: RefUnwindSafe + UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ManuallyDropMut for T
type Ret = ManuallyDrop<T>
fn manually_drop_mut(&'__ mut self) -> &'__ mut ManuallyDrop<T>
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,