Struct rustc_data_structures::sync::RwLock [−][src]
pub struct RwLock<T>(_);
Methods
impl<T> RwLock<T>[src]
impl<T> RwLock<T>pub fn new(inner: T) -> Self[src]
pub fn new(inner: T) -> Selfpub 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 Tpub fn read(&self) -> ReadGuard<T>[src]
pub fn read(&self) -> ReadGuard<T>pub fn with_read_lock<F: FnOnce(&T) -> R, R>(&self, f: F) -> R[src]
pub fn with_read_lock<F: FnOnce(&T) -> R, R>(&self, f: F) -> Rpub fn try_write(&self) -> Result<WriteGuard<T>, ()>[src]
pub fn try_write(&self) -> Result<WriteGuard<T>, ()>pub fn write(&self) -> WriteGuard<T>[src]
pub fn write(&self) -> WriteGuard<T>pub fn with_write_lock<F: FnOnce(&mut T) -> R, R>(&self, f: F) -> R[src]
pub fn with_write_lock<F: FnOnce(&mut T) -> R, R>(&self, f: F) -> Rpub fn borrow(&self) -> ReadGuard<T>[src]
pub fn borrow(&self) -> ReadGuard<T>pub fn borrow_mut(&self) -> WriteGuard<T>[src]
pub fn borrow_mut(&self) -> WriteGuard<T>Trait Implementations
impl<T: Debug> Debug for RwLock<T>[src]
impl<T: Debug> Debug for RwLock<T>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<T: Clone> Clone for RwLock<T>[src]
impl<T: Clone> Clone for RwLock<T>