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

pub trait MutPtrExt {
    type Target;

    unsafe fn as_mut<'a>(&self) -> Option<&'a mut Target>;
}

Methods on mutable raw pointers

Associated Types

type Target

Required Methods

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

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