[][src]Struct safer_ffi::ptr::NonNullMut

#[repr(transparent)]pub struct NonNullMut<T>(pub NonNull<T>, pub PhantomInvariant<T>);

Implementations

impl<T> NonNullMut<T>[src]

pub fn as_ptr(&self) -> *const T[src]

pub fn cast<U>(self: NonNullMut<T>) -> NonNullMut<U>[src]

impl<T> NonNullMut<T>[src]

pub fn as_mut_ptr(&mut self) -> *mut T[src]

pub fn copy(self: &mut NonNullMut<T>) -> NonNullMut<T>[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 NonNullMut<T>[src]

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

type Target = NonNull<T>

The resulting type after dereferencing.

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

impl<'lt, T: 'lt> From<&'lt mut T> for NonNullMut<T>[src]

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

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

type CLayout = *mut T::CLayout

The CType having the same layout as Self.

Auto Trait Implementations

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

impl<T> !Send for NonNullMut<T>

impl<T> !Sync for NonNullMut<T>

impl<T> Unpin for NonNullMut<T>

impl<T> UnwindSafe for NonNullMut<T> where
    T: RefUnwindSafe

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> ManuallyDropMut for T

type Ret = ManuallyDrop<T>

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.