pub struct KeyedDelta<K, D> {
pub key: K,
pub delta: D,
}Expand description
A change to the value stored under one key.
Turn on the serde feature to get Serialize and Deserialize on this,
as a delta struct with an unordered-delta field cannot derive them
otherwise.
Fields§
§key: KThe key whose value changed. It is present in both the old and the new collection — a key on only one side is an addition or a removal instead.
delta: DWhat changed about the value, as produced by Delta::delta.
Trait Implementations§
Source§impl<K: Clone, D: Clone> Clone for KeyedDelta<K, D>
impl<K: Clone, D: Clone> Clone for KeyedDelta<K, D>
Source§fn clone(&self) -> KeyedDelta<K, D>
fn clone(&self) -> KeyedDelta<K, D>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de, K, D> Deserialize<'de> for KeyedDelta<K, D>where
K: Deserialize<'de>,
D: Deserialize<'de>,
impl<'de, K, D> Deserialize<'de> for KeyedDelta<K, D>where
K: Deserialize<'de>,
D: Deserialize<'de>,
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
impl<K: Eq, D: Eq> Eq for KeyedDelta<K, D>
Source§impl<K, D> Serialize for KeyedDelta<K, D>
impl<K, D> Serialize for KeyedDelta<K, D>
impl<K: PartialEq, D: PartialEq> StructuralPartialEq for KeyedDelta<K, D>
Auto Trait Implementations§
impl<K, D> Freeze for KeyedDelta<K, D>
impl<K, D> RefUnwindSafe for KeyedDelta<K, D>where
K: RefUnwindSafe,
D: RefUnwindSafe,
impl<K, D> Send for KeyedDelta<K, D>
impl<K, D> Sync for KeyedDelta<K, D>
impl<K, D> Unpin for KeyedDelta<K, D>
impl<K, D> UnsafeUnpin for KeyedDelta<K, D>where
K: UnsafeUnpin,
D: UnsafeUnpin,
impl<K, D> UnwindSafe for KeyedDelta<K, D>where
K: UnwindSafe,
D: UnwindSafe,
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