pub struct Access<'a, T> { /* private fields */ }Expand description
Shared access to the content of the Wrrm.
Implementations§
Source§impl<'a, T: Clone> Access<'a, T>
impl<'a, T: Clone> Access<'a, T>
Sourcepub fn modify_with(me: Self, modification: impl FnMut(&mut T))
pub fn modify_with(me: Self, modification: impl FnMut(&mut T))
Modifies the value using the given function.
The function will be passed a mutable reference to a copy of the value currently stored in the container.
Note: The function might be called multiple times, with new copies every time, in situations where multiple threads are competing for an update. You are expected to perform the same modification on the value every time.
Trait Implementations§
Auto Trait Implementations§
impl<'a, T> Freeze for Access<'a, T>
impl<'a, T> RefUnwindSafe for Access<'a, T>where
T: RefUnwindSafe,
impl<'a, T> Send for Access<'a, T>
impl<'a, T> Sync for Access<'a, T>
impl<'a, T> Unpin for Access<'a, T>
impl<'a, T> UnwindSafe for Access<'a, T>where
T: RefUnwindSafe,
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