pub struct RwLock<T: ?Sized>(_);
Expand description
Like std::sync::RwLock
except that it does not poison itself.
Implementations
sourceimpl<T: ?Sized> RwLock<T>
impl<T: ?Sized> RwLock<T>
sourcepub fn read<'a>(&'a self) -> RwLockReadGuard<'a, T>
pub fn read<'a>(&'a self) -> RwLockReadGuard<'a, T>
Like std::sync::RwLock::read
.
sourcepub fn try_read<'a>(&'a self) -> TryLockResult<RwLockReadGuard<'a, T>>
pub fn try_read<'a>(&'a self) -> TryLockResult<RwLockReadGuard<'a, T>>
Like std::sync::RwLock::try_read
.
sourcepub fn write<'a>(&'a self) -> RwLockWriteGuard<'a, T>
pub fn write<'a>(&'a self) -> RwLockWriteGuard<'a, T>
Like std::sync::RwLock::write
.
sourcepub fn try_write<'a>(&'a self) -> TryLockResult<RwLockWriteGuard<'a, T>>
pub fn try_write<'a>(&'a self) -> TryLockResult<RwLockWriteGuard<'a, T>>
Like std::sync::RwLock::try_write
.
Trait Implementations
Auto Trait Implementations
impl<T: ?Sized> RefUnwindSafe for RwLock<T>
impl<T: ?Sized> Send for RwLock<T> where
T: Send,
impl<T: ?Sized> Sync for RwLock<T> where
T: Send + Sync,
impl<T: ?Sized> Unpin for RwLock<T> where
T: Unpin,
impl<T: ?Sized> UnwindSafe for RwLock<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more