/// find all changes since a epoch
/// if epoch is before fence, return full changes with epoch,
/// otherwise return delta changes
/// user should keep that epoch and do subsequent changes
find all changes since a epoch
if epoch is before fence, return full changes with epoch,
otherwise return delta changes
user should keep that epoch and do subsequent changes
find all changes since a epoch if epoch is before fence return full changes with epoch otherwise return delta changes user should keep that epoch and do subsequent changes
pub fn changes_since<E>(&self, epoch_value: E) -> EpochChanges<V>
        where
            Epoch: From<E>,
        {
            let epoch = epoch_value.into();
            if epoch < self.fence.epoch() {
                return EpochChanges {
                    epoch: self.epoch.epoch(),
                    changes: EpochDeltaChanges::SyncAll(self.clone_values()),
                };
            }
            if epoch == self.epoch() {
                return EpochChanges {
                    epoch: self.epoch.epoch(),
                    changes: EpochDeltaChanges::empty(),
                };
            }
            let updates = self
                .values()
                .filter_map(|v| {
                    if v.epoch > epoch {
                        Some(v.inner().clone())
                    } else {
                        None
                    }
                })
                .collect();
            let deletes = self
                .deleted
                .iter()
                .filter_map(|d| {
                    if d.epoch > epoch {
                        Some(d.inner().clone())
                    } else {
                        None
                    }
                })
                .collect();
            EpochChanges {
                epoch: self.epoch.epoch(),
                changes: EpochDeltaChanges::Changes((updates, deletes)),
            }
        }
pub fn changes_since < E > ( & self , epoch_value : E ) -> EpochChanges < V > where Epoch : From < E > , { let epoch = epoch_value . into ( ) ; if epoch < self . fence . epoch ( ) { return EpochChanges { epoch : self . epoch . epoch ( ) , changes : EpochDeltaChanges :: SyncAll ( self . clone_values ( ) ) , } ; } if epoch == self . epoch ( ) { return EpochChanges { epoch : self . epoch . epoch ( ) , changes : EpochDeltaChanges :: empty ( ) , } ; } let updates = self . values ( ) . filter_map ( | v | { if v . epoch > epoch { Some ( v . inner ( ) . clone ( ) ) } else { None } } ) . collect ( ) ; let deletes = self . deleted . iter ( ) . filter_map ( | d | { if d . epoch > epoch { Some ( d . inner ( ) . clone ( ) ) } else { None } } ) . collect ( ) ; EpochChanges { epoch : self . epoch . epoch ( ) , changes : EpochDeltaChanges :: Changes ( ( updates , deletes ) ) , } }
find all changes since a epoch
if epoch is before fence, return full changes with epoch,
otherwise return delta changes
user should keep that epoch and do subsequent changes
find all changes since a epoch if epoch is before fence return full changes with epoch otherwise return delta changes user should keep that epoch and do subsequent changes
&self
epoch_value
E