pub struct RwLockWriteGuard<'a, T, Codec = Default> { /* private fields */ }Expand description
RAII structure used to release the exclusive write access of a lock when dropped.
To commit changes commit must be called. Dropping the guard will result in the changes to be not applied to the shared value.
Implementations§
Source§impl<'a, T: RemoteSend, Codec: Codec> RwLockWriteGuard<'a, T, Codec>
impl<'a, T: RemoteSend, Codec: Codec> RwLockWriteGuard<'a, T, Codec>
Sourcepub async fn commit(self) -> Result<(), CommitError>
pub async fn commit(self) -> Result<(), CommitError>
Consumes the guard and commits the changes to the shared value.
Trait Implementations§
Source§impl<'a, T, Codec> Deref for RwLockWriteGuard<'a, T, Codec>
impl<'a, T, Codec> Deref for RwLockWriteGuard<'a, T, Codec>
Auto Trait Implementations§
impl<'a, T, Codec = Json> !Freeze for RwLockWriteGuard<'a, T, Codec>
impl<'a, T, Codec = Json> !RefUnwindSafe for RwLockWriteGuard<'a, T, Codec>
impl<'a, T, Codec> Send for RwLockWriteGuard<'a, T, Codec>
impl<'a, T, Codec> Sync for RwLockWriteGuard<'a, T, Codec>
impl<'a, T, Codec> Unpin for RwLockWriteGuard<'a, T, Codec>
impl<'a, T, Codec = Json> !UnwindSafe for RwLockWriteGuard<'a, T, Codec>
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