pub struct CollectionDelta<T: HasId + Diff> {
pub new_entities: Vec<T>,
pub deleted_entities: Vec<T::Id>,
pub mutated_entities: Vec<(T::Id, T::Delta)>,
}
Expand description
A difference between two collections
Fields§
§new_entities: Vec<T>
Entities present in second, but not in first collection
deleted_entities: Vec<T::Id>
Entities present in first, but not in second collection
mutated_entities: Vec<(T::Id, T::Delta)>
List of deltas for mutated entities (present in both collections that are not equal)
Trait Implementations§
Source§impl<T: Clone + HasId + Diff> Clone for CollectionDelta<T>
impl<T: Clone + HasId + Diff> Clone for CollectionDelta<T>
Source§fn clone(&self) -> CollectionDelta<T>
fn clone(&self) -> CollectionDelta<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'de, T: HasId + Diff> Deserialize<'de> for CollectionDelta<T>
impl<'de, T: HasId + Diff> Deserialize<'de> for CollectionDelta<T>
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 CollectionDelta<T>
impl<T> RefUnwindSafe for CollectionDelta<T>
impl<T> Send for CollectionDelta<T>
impl<T> Sync for CollectionDelta<T>
impl<T> Unpin for CollectionDelta<T>
impl<T> UnwindSafe for CollectionDelta<T>
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