pub struct Mutation<V> {
pub path: Path<true>,
pub kind: MutationKind<V>,
}Expand description
A mutation representing a change to a value at a specific path.
Mutation captures both the location where a change occurred (via path) and the kind of
change that was made (via operation). Mutations can be applied to values to reproduce the
changes they represent.
§Path Representation
The path is stored in reverse order for efficiency during collection.
For example, a change at foo.bar.baz would have path = ["baz", "bar", "foo"].
Fields§
§path: Path<true>The path to the mutated value, stored in reverse order.
An empty vec indicates a mutation at the root level.
kind: MutationKind<V>The kind of mutation that occurred.
Implementations§
Trait Implementations§
impl<V: Eq> Eq for Mutation<V>
impl<V> StructuralPartialEq for Mutation<V>
Auto Trait Implementations§
impl<V> Freeze for Mutation<V>where
V: Freeze,
impl<V> RefUnwindSafe for Mutation<V>where
V: RefUnwindSafe,
impl<V> Send for Mutation<V>where
V: Send,
impl<V> Sync for Mutation<V>where
V: Sync,
impl<V> Unpin for Mutation<V>where
V: Unpin,
impl<V> UnwindSafe for Mutation<V>where
V: UnwindSafe,
Blanket Implementations§
Source§impl<T> AsDerefCoinductive<Zero> for Twhere
T: ?Sized,
impl<T> AsDerefCoinductive<Zero> for Twhere
T: ?Sized,
Source§impl<T> AsDerefMut<Zero> for Twhere
T: ?Sized,
impl<T> AsDerefMut<Zero> for Twhere
T: ?Sized,
Source§fn as_deref_mut(&mut self) -> &mut T
fn as_deref_mut(&mut self) -> &mut T
Mutably dereferences self
N times.Source§impl<T> AsDerefMutCoinductive<Zero> for Twhere
T: ?Sized,
impl<T> AsDerefMutCoinductive<Zero> for Twhere
T: ?Sized,
Source§fn as_deref_mut_coinductive(&mut self) -> &mut T
fn as_deref_mut_coinductive(&mut self) -> &mut T
Mutably dereferences self
N times.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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.