pub enum DataDelta {
None,
Range(IdxSpan),
Full,
}Expand description
What changed in a series since a given generation.
§Examples
use ferrochart_core::data::{ChangeLog, DataDelta, IdxSpan};
let mut log = ChangeLog::new();
let synced = log.generation();
log.record(IdxSpan { start: 9, end: 10 }); // update_last on bar 9
assert_eq!(log.changes_since(synced), DataDelta::Range(IdxSpan { start: 9, end: 10 }));
assert_eq!(log.changes_since(log.generation()), DataDelta::None);Variants§
None
Nothing changed.
Range(IdxSpan)
Every change lies within this logical index span (based on the fixed
logical index origin, so it stays valid after Prepend). It may be larger
than the exact set of changed slots, never smaller.
Full
The data was replaced (or the consumer never synced): re-upload everything.
Trait Implementations§
impl Copy for DataDelta
impl Eq for DataDelta
impl StructuralPartialEq for DataDelta
Auto Trait Implementations§
impl Forget for DataDelta
impl Freeze for DataDelta
impl Move for DataDelta
impl RefUnwindSafe for DataDelta
impl Send for DataDelta
impl Sync for DataDelta
impl Unpin for DataDelta
impl UnsafeUnpin for DataDelta
impl UnwindSafe for DataDelta
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