pub struct ReentrantLockGuard<'a, T: ?Sized + 'a> { /* private fields */ }
reentrant_lock #121440)
An RAII implementation of a “scoped lock” of a re-entrant lock. When this structure is dropped (falls out of scope), the lock will be unlocked.
The data protected by the mutex can be accessed through this guard via its Deref implementation.
This structure is created by the lock method on ReentrantLock.
Unlike MutexGuard, ReentrantLockGuard does not implement DerefMut, because implementation of the trait would violate Rust’s reference aliasing rules. Use interior mutability (usually RefCell) in order to mutate the guarded data.
impl<T: Debug + ?Sized> Debug for ReentrantLockGuard<'_, T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<T: ?Sized> Deref for ReentrantLockGuard<'_, T>
type Target = T
fn deref(&self) -> &T
impl<T: Display + ?Sized> Display for ReentrantLockGuard<'_, T>
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<T: ?Sized> Drop for ReentrantLockGuard<'_, T>
impl<T: ?Sized> !Send for ReentrantLockGuard<'_, T>
impl<T: ?Sized + Sync> Sync for ReentrantLockGuard<'_, T>
impl<'a, T> Freeze for ReentrantLockGuard<'a, T>where
T: ?Sized,impl<'a, T> RefUnwindSafe for ReentrantLockGuard<'a, T>where
T: RefUnwindSafe + ?Sized,impl<'a, T> Unpin for ReentrantLockGuard<'a, T>where
T: ?Sized,impl<'a, T> UnwindSafe for ReentrantLockGuard<'a, T>where
T: RefUnwindSafe + ?Sized,impl<T> Any for Twhere
T: 'static + ?Sized,impl<T> Borrow<T> for Twhere
T: ?Sized,impl<T> BorrowMut<T> for Twhere
T: ?Sized,impl<T> From<T> for T
fn from(t: T) -> T
Returns the argument unchanged.
impl<T, U> Into<U> for Twhere
U: From<T>,fn into(self) -> U
Calls U::from(self).
That is, this conversion is whatever the implementation of From<T> for U chooses to do.
impl<P, T> Receiver for Pwhere
P: Deref<Target = T> + ?Sized,
T: ?Sized,type Target = T
arbitrary_self_types #44874)
impl<T> ToString for Twhere
T: Display + ?Sized,impl<T, U> TryFrom<U> for Twhere
U: Into<T>,type Error = Infallible
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for Twhere
U: TryFrom<T>,
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/sync/struct.ReentrantLockGuard.html