Struct RwLockWriteGuard
pub struct RwLockWriteGuard<'a, T>where
T: ?Sized,{ /* private fields */ }Expand description
RAII structure used to release the exclusive write access of a lock when dropped.
This structure is created by the write method on RwLock.
Implementations§
§impl<'a, T> RwLockWriteGuard<'a, T>where
T: ?Sized,
impl<'a, T> RwLockWriteGuard<'a, T>where
T: ?Sized,
pub fn map<U, F>(this: RwLockWriteGuard<'a, T>, f: F) -> RwLockWriteGuard<'a, U>
pub fn map<U, F>(this: RwLockWriteGuard<'a, T>, f: F) -> RwLockWriteGuard<'a, U>
Makes a new RwLockWriteGuard for a component of the locked data.
This operation cannot fail as data is already locked.
This is an associated function that needs to be used as RwLockWriteGuard::map(...). A
method would interfere with methods of the same name on the contents of the underlying data
used through Deref.
pub fn filter_map<U, F>(
this: RwLockWriteGuard<'a, T>,
f: F,
) -> Result<RwLockWriteGuard<'a, U>, RwLockWriteGuard<'a, T>>
pub fn filter_map<U, F>( this: RwLockWriteGuard<'a, T>, f: F, ) -> Result<RwLockWriteGuard<'a, U>, RwLockWriteGuard<'a, T>>
Tries to make a new RwLockWriteGuard for a component of the locked data. Returns the
original write guard if the closure returns None.
This operation cannot fail as data is already locked.
This is an associated function that needs to be used as RwLockWriteGuard::filter_map(...).
A method would interfere with methods of the same name on the contents of the underlying
data used through Deref.
This function is not available before Rust 1.63.
Trait Implementations§
§impl<'a, T> Debug for RwLockWriteGuard<'a, T>
impl<'a, T> Debug for RwLockWriteGuard<'a, T>
§impl<T> Deref for RwLockWriteGuard<'_, T>where
T: ?Sized,
impl<T> Deref for RwLockWriteGuard<'_, T>where
T: ?Sized,
§impl<T> DerefMut for RwLockWriteGuard<'_, T>
impl<T> DerefMut for RwLockWriteGuard<'_, T>
§fn deref_mut(&mut self) -> &mut <RwLockWriteGuard<'_, T> as Deref>::Target
fn deref_mut(&mut self) -> &mut <RwLockWriteGuard<'_, T> as Deref>::Target
Auto Trait Implementations§
impl<'a, T> Freeze for RwLockWriteGuard<'a, T>where
T: ?Sized,
impl<'a, T> !RefUnwindSafe for RwLockWriteGuard<'a, T>
impl<'a, T> !Send for RwLockWriteGuard<'a, T>
impl<'a, T> !Sync for RwLockWriteGuard<'a, T>
impl<'a, T> Unpin for RwLockWriteGuard<'a, T>where
T: ?Sized,
impl<'a, T> !UnwindSafe for RwLockWriteGuard<'a, T>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
self to a value of a Properties struct.