[−][src]Trait smart_pointer::IntoMut
A SmartPointer
which might grant mutable access, depending on run-time checks.
Associated Types
type MutablePointer: SmartPointerMut<T> + Into<Self>
Required methods
fn can_make_mut(this: &Self) -> bool
Check whether converting into a mutable version would succeed.
unsafe fn into_mut_unchecked(this: Self) -> Self::MutablePointer
Convert into a mutable version without performing runtime checks for upholding any invariants.
Safety: Calling this is safe if and only if can_make_mut
returns true.
unsafe fn get_mut_unchecked(this: &Self) -> &mut T
Obtain a mutable reference to the wrapped value without performing runtime checks for upholding any invariants.
Safety: Calling this is safe if and only if can_make_mut
returns true.
Provided methods
fn into_mut(this: Self) -> Result<Self::MutablePointer, Self>
Try converting into a mutable version of the pointer.
fn get_mut(this: &Self) -> Option<&mut T>
Try obtaining a mutable reference to the wrapped value.