Struct vstd::rwlock::WriteHandle
source · pub struct WriteHandle<'a, V, Pred: RwLockPredicate<V>> { /* private fields */ }
Expand description
Handle obtained for an exclusive write-lock from an RwLock
.
Note that this handle does not contain a reference to the lock-protected object;
ownership of the object is obtained separately from RwLock::acquire_write
.
This may be changed in the future.
Warning: The lock is NOT released automatically when the handle
is dropped. You must call release_write
.
Verus does not check that lock is released.
Implementations§
source§impl<'a, V, Pred: RwLockPredicate<V>> WriteHandle<'a, V, Pred>
impl<'a, V, Pred: RwLockPredicate<V>> WriteHandle<'a, V, Pred>
sourcepub exec fn release_write(self, t: V)
pub exec fn release_write(self, t: V)
requires
self.rwlock().inv(t),
Auto Trait Implementations§
impl<'a, V, Pred> !RefUnwindSafe for WriteHandle<'a, V, Pred>
impl<'a, V, Pred> Send for WriteHandle<'a, V, Pred>
impl<'a, V, Pred> Sync for WriteHandle<'a, V, Pred>
impl<'a, V, Pred> Unpin for WriteHandle<'a, V, Pred>
impl<'a, V, Pred> !UnwindSafe for WriteHandle<'a, V, Pred>
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