pub struct ArcRwLockWriteGuardian<T: 'static> { /* private fields */ }
Expand description

RAII structure used to release the exclusive write access of a lock when dropped. Keeps a handle to an Arc so that the lock is not dropped until the guard is.

The data protected by the mutex can be access through this guard via its Deref and DerefMut implementations.

Implementations§

Locks this rwlock with exclusive write access, blocking the current thread until it can be acquired.

This function will not return while other writers or other readers currently have access to the lock.

Returns an RAII guard which will drop the write access of this rwlock when dropped. The guardian also holds a strong reference to the lock’s Arc, which is dropped when the guard is.

Errors

This function will return an error if the RwLock is poisoned. An RwLock is poisoned whenever a writer panics while holding an exclusive lock. An error will be returned when the lock is acquired.

Trait Implementations§

The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.