Trait core::ptr::MutPtrExtStable [-]  [+] [src]

pub trait MutPtrExt<T> {
    unsafe fn as_mut<'a>(&self) -> Option<&'a mut T>;
}

Methods on mutable raw pointers

Required Methods

unsafe fn as_mut<'a>(&self) -> Option<&'a mut T>

Returns None if the pointer is null, or else returns a mutable reference to the value wrapped in Some.

Safety

As with as_ref, this is unsafe because it cannot verify the validity of the returned pointer.

Implementors