pub struct RwLock<T>(/* private fields */);Implementations§
Source§impl<T> RwLock<T>
impl<T> RwLock<T>
pub fn new(value: T) -> Self
pub fn lock_sync_read(&self) -> RwLockReadGuard<'_, T>
pub fn lock_sync_write(&self) -> RwLockWriteGuard<'_, T>
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for RwLock<T>
impl<T> !RefUnwindSafe for RwLock<T>
impl<T> Send for RwLock<T>where
T: Send,
impl<T> Sync for RwLock<T>
impl<T> Unpin for RwLock<T>where
T: Unpin,
impl<T> UnsafeUnpin for RwLock<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for RwLock<T>where
T: UnwindSafe,
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