Struct RwLockReadGuard
struct RwLockReadGuard<'a, T: ?Sized> { ... }
RAII structure used to release the shared read access of a lock when dropped.
Implementations
impl<'a, T: ?Sized> RwLockReadGuard<'a, T>
fn map<F, U: ?Sized>(this: Self, f: F) -> RwLockReadGuard<'a, U> where F: FnOnce(&T) -> &UMakes a new
RwLockReadGuardfor a component of the locked data.This operation cannot fail as the
RwLockReadGuardpassed in already locked the data.This is an associated function that needs to be used as
RwLockReadGuard::map(...). A method would interfere with methods of the same name on the contents of the locked data.This is an asynchronous version of
RwLockReadGuard::mapfrom theparking_lotcrate.Examples
use ; ; # # asyncfn try_map<F, U: ?Sized>(this: Self, f: F) -> Result<RwLockReadGuard<'a, U>, Self> where F: FnOnce(&T) -> Option<&U>Attempts to make a new
RwLockReadGuardfor a component of the locked data. The original guard is returned if the closure returnsNone.This operation cannot fail as the
RwLockReadGuardpassed in already locked the data.This is an associated function that needs to be used as
RwLockReadGuard::try_map(..). A method would interfere with methods of the same name on the contents of the locked data.This is an asynchronous version of
RwLockReadGuard::try_mapfrom theparking_lotcrate.Examples
use ; ; # # async
impl<'a, T> Debug for RwLockReadGuard<'a, T>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<'a, T> Display for RwLockReadGuard<'a, T>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl<'a, T> Freeze for RwLockReadGuard<'a, T>
impl<'a, T> RefUnwindSafe for RwLockReadGuard<'a, T>
impl<'a, T> Unpin for RwLockReadGuard<'a, T>
impl<'a, T> UnsafeUnpin for RwLockReadGuard<'a, T>
impl<'a, T> UnwindSafe for RwLockReadGuard<'a, T>
impl<'a, T: ?Sized> Drop for RwLockReadGuard<'a, T>
fn drop(self: &mut Self)
impl<P, T> Receiver for RwLockReadGuard<'a, T>
impl<T> Any for RwLockReadGuard<'a, T>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for RwLockReadGuard<'a, T>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for RwLockReadGuard<'a, T>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> From for RwLockReadGuard<'a, T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> Send for RwLockReadGuard<'_, T>
impl<T> Sync for RwLockReadGuard<'_, T>
impl<T> ToString for RwLockReadGuard<'a, T>
fn to_string(self: &Self) -> String
impl<T, U> Into for RwLockReadGuard<'a, T>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for RwLockReadGuard<'a, T>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for RwLockReadGuard<'a, T>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T: ?Sized> Deref for RwLockReadGuard<'_, T>
fn deref(self: &Self) -> &T