Struct comemo::TrackedMut
source · pub struct TrackedMut<'a, T, C = <T as Validate>::Constraint>where
T: Track + ?Sized,{ /* private fields */ }Expand description
Tracks accesses and mutations to a value.
Encapsulates a mutable reference to a value and tracks all accesses to it.
The only methods accessible on TrackedMut<T> are those defined in an
implementation block or trait for T annotated with #[track]. For more
details, see its documentation.
For more details, see Tracked.
Implementations§
source§impl<'a, T> TrackedMut<'a, T>where
T: Track + ?Sized,
impl<'a, T> TrackedMut<'a, T>where T: Track + ?Sized,
sourcepub fn downgrade(this: Self) -> Tracked<'a, T>
pub fn downgrade(this: Self) -> Tracked<'a, T>
Downgrade to an immutable reference.
This is an associated function as to not interfere with any methods
defined on T. It should be called as TrackedMut::downgrade(...).
sourcepub fn reborrow(this: &Self) -> Tracked<'_, T>
pub fn reborrow(this: &Self) -> Tracked<'_, T>
Reborrow with a shorter lifetime.
This is an associated function as to not interfere with any methods
defined on T. It should be called as TrackedMut::reborrow(...).
sourcepub fn reborrow_mut(this: &mut Self) -> TrackedMut<'_, T>
pub fn reborrow_mut(this: &mut Self) -> TrackedMut<'_, T>
Reborrow mutably with a shorter lifetime.
This is an associated function as to not interfere with any methods
defined on T. It should be called as TrackedMut::reborrow_mut(...).