pub struct OwnedRwLockWriteGuard<T> { /* private fields */ }Expand description
Owned write guard that can be moved between tasks.
Implementations§
Source§impl<T> OwnedRwLockWriteGuard<T>
impl<T> OwnedRwLockWriteGuard<T>
Sourcepub fn write(lock: Arc<RwLock<T>>, cx: &Cx) -> OwnedWriteFuture<'_, T>
pub fn write(lock: Arc<RwLock<T>>, cx: &Cx) -> OwnedWriteFuture<'_, T>
Acquires an owned write guard from an Arc<RwLock<T>>.
Sourcepub fn try_write(lock: Arc<RwLock<T>>) -> Result<Self, TryWriteError>
pub fn try_write(lock: Arc<RwLock<T>>) -> Result<Self, TryWriteError>
Tries to acquire an owned write guard without waiting.
Sourcepub fn with_write<F, R>(&mut self, f: F) -> R
pub fn with_write<F, R>(&mut self, f: F) -> R
Executes a closure with exclusive access to the data.
Trait Implementations§
Source§impl<T: Debug> Debug for OwnedRwLockWriteGuard<T>
impl<T: Debug> Debug for OwnedRwLockWriteGuard<T>
Source§impl<T> Deref for OwnedRwLockWriteGuard<T>
impl<T> Deref for OwnedRwLockWriteGuard<T>
Source§impl<T> DerefMut for OwnedRwLockWriteGuard<T>
impl<T> DerefMut for OwnedRwLockWriteGuard<T>
Auto Trait Implementations§
impl<T> Freeze for OwnedRwLockWriteGuard<T>
impl<T> !RefUnwindSafe for OwnedRwLockWriteGuard<T>
impl<T> Send for OwnedRwLockWriteGuard<T>
impl<T> Sync for OwnedRwLockWriteGuard<T>
impl<T> Unpin for OwnedRwLockWriteGuard<T>
impl<T> UnsafeUnpin for OwnedRwLockWriteGuard<T>
impl<T> !UnwindSafe for OwnedRwLockWriteGuard<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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).