Struct rustc_data_structures::sync::Lock [−][src]
pub struct Lock<T>(_);
Methods
impl<T> Lock<T>
[src]
impl<T> Lock<T>
pub fn new(inner: T) -> Self
[src]
pub fn new(inner: T) -> Self
pub fn into_inner(self) -> T
[src]
pub fn into_inner(self) -> T
ⓘImportant traits for &'a mut Rpub fn get_mut(&mut self) -> &mut T
[src]
ⓘImportant traits for &'a mut R
pub fn get_mut(&mut self) -> &mut T
pub fn try_lock(&self) -> Option<LockGuard<T>>
[src]
pub fn try_lock(&self) -> Option<LockGuard<T>>
pub fn lock(&self) -> LockGuard<T>
[src]
pub fn lock(&self) -> LockGuard<T>
pub fn with_lock<F: FnOnce(&mut T) -> R, R>(&self, f: F) -> R
[src]
pub fn with_lock<F: FnOnce(&mut T) -> R, R>(&self, f: F) -> R
pub fn borrow(&self) -> LockGuard<T>
[src]
pub fn borrow(&self) -> LockGuard<T>
pub fn borrow_mut(&self) -> LockGuard<T>
[src]
pub fn borrow_mut(&self) -> LockGuard<T>
Trait Implementations
impl<T: Debug> Debug for Lock<T>
[src]
impl<T: Debug> Debug for Lock<T>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<T: Default> Default for Lock<T>
[src]
impl<T: Default> Default for Lock<T>
impl<T: Clone> Clone for Lock<T>
[src]
impl<T: Clone> Clone for Lock<T>