pub struct History { /* private fields */ }Expand description
What a run remembers from tick to tick, per market.
Implementations§
Source§impl History
impl History
Sourcepub fn read(
&mut self,
market: &str,
trades: Result<&[Trade], &str>,
volume_24h: Option<f64>,
now_ms: u64,
window_ms: u64,
) -> Readings
pub fn read( &mut self, market: &str, trades: Result<&[Trade], &str>, volume_24h: Option<f64>, now_ms: u64, window_ms: u64, ) -> Readings
Reads this tick of market against the last one and remembers it.
trades is the venue’s tape (or why there is none) and volume_24h
its 24h volume. The first tick has no tick before it: its largest
trade is over the last window_ms (one interval) before now_ms,
and its volume change waits for a second reading.
Trait Implementations§
impl StructuralPartialEq for History
Auto Trait Implementations§
impl Forget for History
impl Freeze for History
impl RefUnwindSafe for History
impl Send for History
impl Sync for History
impl Unpin for History
impl UnsafeUnpin for History
impl UnwindSafe for History
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