pub(crate) struct OwnedRwLock<T>(Arc<RwLock<T>>);Expand description
Read-write lock whose guards own the lock, so a guard can outlive its owner.
Tuple Fields§
§0: Arc<RwLock<T>>Implementations§
Source§impl<T> OwnedRwLock<T>
impl<T> OwnedRwLock<T>
Sourcepub async fn read(&self) -> OwnedRwLockReadGuard<T>
pub async fn read(&self) -> OwnedRwLockReadGuard<T>
Acquire an owned read lock.
Sourcepub async fn write(&self) -> OwnedRwLockWriteGuard<T>
pub async fn write(&self) -> OwnedRwLockWriteGuard<T>
Acquire an owned write lock.
Trait Implementations§
Source§impl<T> Clone for OwnedRwLock<T>
impl<T> Clone for OwnedRwLock<T>
Source§impl<T: Debug> Debug for OwnedRwLock<T>
impl<T: Debug> Debug for OwnedRwLock<T>
Source§impl<T: Default> Default for OwnedRwLock<T>
impl<T: Default> Default for OwnedRwLock<T>
Source§fn default() -> OwnedRwLock<T>
fn default() -> OwnedRwLock<T>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<T> Freeze for OwnedRwLock<T>
impl<T> !RefUnwindSafe for OwnedRwLock<T>
impl<T> Send for OwnedRwLock<T>
impl<T> Sync for OwnedRwLock<T>
impl<T> Unpin for OwnedRwLock<T>
impl<T> UnsafeUnpin for OwnedRwLock<T>
impl<T> !UnwindSafe for OwnedRwLock<T>
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