pub struct ExportRangeBarProcessor { /* private fields */ }Expand description
Export-oriented range bar processor for streaming use cases
This implementation uses the proven fixed-point arithmetic algorithm that achieves 100% breach consistency compliance in multi-year processing.
Implementations§
Source§impl ExportRangeBarProcessor
impl ExportRangeBarProcessor
Sourcepub fn new(threshold_bps: u32) -> Result<Self, ProcessingError>
pub fn new(threshold_bps: u32) -> Result<Self, ProcessingError>
Create new export processor with given threshold
§Arguments
threshold_bps- Threshold in tenths of basis points (0.1bps units)- Example:
250→ 25bps = 0.25% - Example:
10→ 1bps = 0.01% - Minimum:
1→ 0.1bps = 0.001%
- Example:
§Breaking Change (v3.0.0)
Prior to v3.0.0, threshold_bps was in 1bps units.
Migration: Multiply all threshold values by 10.
Sourcepub fn process_trades_continuously(&mut self, trades: &[AggTrade])
pub fn process_trades_continuously(&mut self, trades: &[AggTrade])
Process trades continuously using proven fixed-point algorithm This method maintains 100% breach consistency by using precise integer arithmetic
Sourcepub fn get_all_completed_bars(&mut self) -> Vec<RangeBar>
pub fn get_all_completed_bars(&mut self) -> Vec<RangeBar>
Get all completed bars accumulated so far This drains the internal buffer to avoid memory leaks
Sourcepub fn get_incomplete_bar(&mut self) -> Option<RangeBar>
pub fn get_incomplete_bar(&mut self) -> Option<RangeBar>
Get incomplete bar if exists (for final bar processing)
Auto Trait Implementations§
impl Freeze for ExportRangeBarProcessor
impl RefUnwindSafe for ExportRangeBarProcessor
impl Send for ExportRangeBarProcessor
impl Sync for ExportRangeBarProcessor
impl Unpin for ExportRangeBarProcessor
impl UnwindSafe for ExportRangeBarProcessor
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