Struct std::sync::rwlock::RwLock
[−]
[src]
pub struct RwLock<T: ?Sized> { inner: Mutex<RwLockInner>, value: UnsafeCell<T>, }
Fields
inner | |
value |
Methods
impl<T> RwLock<T>
fn new(value: T) -> Self
Create a new mutex with value value
.
impl<T: ?Sized> RwLock<T>
fn read(&self) -> RwLockReadGuard<T>
Lock for read
fn write(&self) -> RwLockWriteGuard<T>
Lock for write