Struct std::sync::mutex::MutexGuard [] [src]

pub struct MutexGuard<'a, T: ?Sized + 'a> {
    lock: &'a AtomicBool,
    data: &'a UnsafeCell<T>,
}

A mutex guard (returned by .lock())

Fields

lock
data

Methods

impl<'mutex, T: ?Sized> MutexGuard<'mutex, T>

fn new(lock: &'mutex AtomicBool, data: &'mutex UnsafeCell<T>) -> Self

Trait Implementations

impl<'mutex, T: ?Sized> Deref for MutexGuard<'mutex, T>

type Target = T

fn deref<'a>(&'a self) -> &'a T

impl<'mutex, T: ?Sized> DerefMut for MutexGuard<'mutex, T>

fn deref_mut<'a>(&'a mut self) -> &'a mut T

impl<'a, T: ?Sized> Drop for MutexGuard<'a, T>

fn drop(&mut self)