Method lrs::sync::Mutex::data

Provides mutable access to the protected data without locking the lock.

Syntax

impl<T> Mutex<T> {
    fn data(&mut self) -> &mut T
}

Remarks

This is safe because the availability of a mutable reference implies that there are currently no mutex-guards borrowing the mutex. Vice versa, no mutex guards can be created while the data is borrowed.