pub struct MultiSeriesAligner { /* private fields */ }Expand description
Generalizes MultiSeriesSync from exactly two series (primary/benchmark) to an arbitrary,
named set: N-way synchronization, an optional maximum forward-fill staleness age, and explicit
per-series BarQuality (observed vs. forward-filled) instead of a single implicit benchmark
slot.
Implementations§
Source§impl MultiSeriesAligner
impl MultiSeriesAligner
pub fn new(series_ids: impl IntoIterator<Item = impl Into<String>>) -> Self
pub fn with_policy(self, policy: MissingSeriesPolicy) -> Self
Sourcepub fn with_max_forward_fill_age(self, seconds: i64) -> Self
pub fn with_max_forward_fill_age(self, seconds: i64) -> Self
Caps how old (in seconds) a forward-filled bar may be before it is dropped instead of reused, so a series that has gone permanently silent does not keep forward-filling forever.
pub fn reset(&mut self)
Sourcepub fn align_step(
&mut self,
timestamp: i64,
incoming: &HashMap<String, Bar>,
) -> AlignedStep
pub fn align_step( &mut self, timestamp: i64, incoming: &HashMap<String, Bar>, ) -> AlignedStep
Aligns one step at timestamp. incoming holds bars for whichever configured series
delivered one for exactly this timestamp; missing series are forward-filled (subject to
MultiSeriesAligner::with_max_forward_fill_age) or skipped per the configured
MissingSeriesPolicy.
Trait Implementations§
Source§impl Clone for MultiSeriesAligner
impl Clone for MultiSeriesAligner
Source§fn clone(&self) -> MultiSeriesAligner
fn clone(&self) -> MultiSeriesAligner
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 MultiSeriesAligner
impl RefUnwindSafe for MultiSeriesAligner
impl Send for MultiSeriesAligner
impl Sync for MultiSeriesAligner
impl Unpin for MultiSeriesAligner
impl UnsafeUnpin for MultiSeriesAligner
impl UnwindSafe for MultiSeriesAligner
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