Function alloc::arc::get_mut
[−]
[src]
pub fn get_mut<T>(this: &mut Arc<T>) -> Option<&mut T>
Unstable
Returns a mutable reference to the contained value if the Arc<T>
`Arc
Returns None
`Noneif the
` if the Arc<T>
`Arc
Examples
extern crate alloc; use alloc::arc::{Arc, get_mut}; let mut x = Arc::new(3); *get_mut(&mut x).unwrap() = 4; assert_eq!(*x, 4); let _y = x.clone(); assert!(get_mut(&mut x).is_none());