pub(crate) struct RwLock<T: ?Sized>(RwLock<T>);
Expand description
Adapter for std::sync::RwLock
that removes the poisoning aspects
from its api.
Tuple Fields§
§0: RwLock<T>
Implementations§
source§impl<T> RwLock<T>
impl<T> RwLock<T>
pub(crate) fn new(t: T) -> Self
pub(crate) fn read(&self) -> RwLockReadGuard<'_, T>
pub(crate) fn try_read(&self) -> Option<RwLockReadGuard<'_, T>>
pub(crate) fn write(&self) -> RwLockWriteGuard<'_, T>
pub(crate) fn try_write(&self) -> Option<RwLockWriteGuard<'_, T>>
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for RwLock<T>
impl<T> RefUnwindSafe for RwLock<T>where
T: ?Sized,
impl<T> Send for RwLock<T>
impl<T> Sync for RwLock<T>
impl<T> Unpin for RwLock<T>
impl<T> UnwindSafe for RwLock<T>where
T: ?Sized,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more