[−][src]Struct safer_ffi::ptr::NonNullMut
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) -> &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 NonNullMut<T>
[src]
fn fmt(self: &NonNullMut<T>, fmt: &mut Formatter) -> Result
[src]
impl<T> Deref for NonNullMut<T>
[src]
type Target = NonNull<T>
The resulting type after dereferencing.
fn deref(self: &NonNullMut<T>) -> &NonNull<T>
[src]
impl<T> DerefMut for NonNullMut<T>
[src]
fn deref_mut(self: &mut NonNullMut<T>) -> &mut NonNull<T>
[src]
impl<'lt, T: 'lt> From<&'lt mut T> for NonNullMut<T>
[src]
fn from(it: &'lt mut T) -> NonNullMut<T>
[src]
impl<T> From<NonNull<T>> for NonNullMut<T>
[src]
impl<T: ReprC> ReprC for NonNullMut<T>
[src]
Auto Trait Implementations
impl<T> RefUnwindSafe for NonNullMut<T> where
T: RefUnwindSafe,
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,
T: RefUnwindSafe,
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, 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>,