pub enum DataUpdate {
NewBars {
symbol: String,
bars: Vec<Bar>,
},
HistoricalBars {
symbol: String,
bars: Vec<Bar>,
},
FullDataset {
symbol: String,
bars: Vec<Bar>,
},
SymbolsChanged(Vec<String>),
ConnStatus(bool),
}Expand description
An incremental data update returned by DataSource::poll.
The chart engine pattern-matches on these variants to decide how to merge incoming data into its internal bar buffer.
Variants§
NewBars
New bars appended to the right edge (live / streaming data).
Fields
HistoricalBars
Historical bars prepended to the left edge (lazy-loaded older data).
FullDataset
Full dataset replacement (initial load or symbol/timeframe change).
Fields
SymbolsChanged(Vec<String>)
The set of available symbols has changed.
ConnStatus(bool)
Connection status changed (true = connected, false = disconnected).
Trait Implementations§
Source§impl Clone for DataUpdate
impl Clone for DataUpdate
Source§fn clone(&self) -> DataUpdate
fn clone(&self) -> DataUpdate
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 moreAuto Trait Implementations§
impl Freeze for DataUpdate
impl RefUnwindSafe for DataUpdate
impl Send for DataUpdate
impl Sync for DataUpdate
impl Unpin for DataUpdate
impl UnsafeUnpin for DataUpdate
impl UnwindSafe for DataUpdate
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