pub struct Mrc<T> { /* private fields */ }Expand description
Atomic counted wrapper that updates a nonce counter on every mutable access of the inner content
in an inner mutable container such as an RwLock or Mutex. It’s PartialEq behavior is reduced to
comparing the memory location and counter index. For the potentially expensive true inner
equality comparison, look for the implementation of inner_eq.
Implementations§
Trait Implementations§
Source§impl<T> BorrowDeref<T> for Mrc<RefCell<T>>
impl<T> BorrowDeref<T> for Mrc<RefCell<T>>
Source§impl<T> BorrowDerefMut<T> for Mrc<RefCell<T>>
impl<T> BorrowDerefMut<T> for Mrc<RefCell<T>>
Source§fn borrow_mut(&self) -> impl DerefMut<Target = T> + '_
fn borrow_mut(&self) -> impl DerefMut<Target = T> + '_
Mutably borrow the inner value.
Source§impl<'de, T: Deserialize<'de>> Deserialize<'de> for Mrc<RefCell<T>>
Available on crate feature serde only.
impl<'de, T: Deserialize<'de>> Deserialize<'de> for Mrc<RefCell<T>>
Available on crate feature
serde only.Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<T> !Freeze for Mrc<T>
impl<T> !RefUnwindSafe for Mrc<T>
impl<T> !Send for Mrc<T>
impl<T> !Sync for Mrc<T>
impl<T> Unpin for Mrc<T>
impl<T> UnwindSafe for Mrc<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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, BD> With<T> for BDwhere
BD: BorrowDeref<T>,
impl<T, BD> With<T> for BDwhere
BD: BorrowDeref<T>,
Source§impl<T, BDM> WithInnerMut<T> for BDMwhere
BDM: BorrowDerefMut<T>,
impl<T, BDM> WithInnerMut<T> for BDMwhere
BDM: BorrowDerefMut<T>,
Source§fn with_inner_mut<R>(&self, f: impl FnOnce(&mut T) -> R) -> R
fn with_inner_mut<R>(&self, f: impl FnOnce(&mut T) -> R) -> R
Apply a function to mutate this value.