[][src]Struct safer_ffi::ptr::NonNullOwned

#[repr(transparent)]pub struct NonNullOwned<T>(pub NonNull<T>, pub PhantomData<T>);

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]

pub unsafe fn drop_in_place_and_dealloc<T>(self)[src]

pub unsafe fn drop_in_place<T>(self)[src]

Methods from Deref<Target = NonNull<T>>

pub unsafe fn as_ref(&self) -> &T1.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 T1.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]

impl<T> Deref for NonNullOwned<T>[src]

type Target = NonNull<T>

The resulting type after dereferencing.

impl<T> DerefMut for NonNullOwned<T>[src]

impl<T> From<NonNull<T>> for NonNullOwned<T>[src]

impl<T: ReprC> ReprC for NonNullOwned<T>[src]

type CLayout = *mut T::CLayout

The CType having the same layout as Self.

Auto Trait Implementations

impl<T> RefUnwindSafe for NonNullOwned<T> where
    T: RefUnwindSafe

impl<T> !Send for NonNullOwned<T>

impl<T> !Sync for NonNullOwned<T>

impl<T> Unpin for NonNullOwned<T> where
    T: Unpin

impl<T> UnwindSafe for NonNullOwned<T> where
    T: RefUnwindSafe + UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.