pub struct BarUpdate {
pub time: Timestamp,
pub open: f64,
pub high: f64,
pub low: f64,
pub close: f64,
pub volume: Option<f64>,
}Expand description
A real-time update for Chart::update_last.
If time equals the time of the last bar, that bar is replaced; if it is
later, a new bar is appended.
§Examples
use ferrochart_core::data::BarUpdate;
let tick = BarUpdate { time: 60_000, open: 10.0, high: 11.0, low: 9.5, close: 10.5, volume: Some(3.0) };
assert!(tick.low <= tick.close);Fields§
§time: TimestampBar open time (UTC milliseconds).
open: f64Open price.
high: f64High price.
low: f64Low price.
close: f64Close price.
volume: Option<f64>Volume; must be present exactly when the series has volume.
Trait Implementations§
impl Copy for BarUpdate
impl StructuralPartialEq for BarUpdate
Auto Trait Implementations§
impl Forget for BarUpdate
impl Freeze for BarUpdate
impl Move for BarUpdate
impl RefUnwindSafe for BarUpdate
impl Send for BarUpdate
impl Sync for BarUpdate
impl Unpin for BarUpdate
impl UnsafeUnpin for BarUpdate
impl UnwindSafe for BarUpdate
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