pub struct BacktestDataIterator { /* private fields */ }Expand description
Multi-stream, time-ordered data iterator used by the backtest engine.
Implementations§
Source§impl BacktestDataIterator
impl BacktestDataIterator
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new empty BacktestDataIterator.
Sourcepub fn add_data(&mut self, name: &str, data: Vec<Data>, append_data: bool)
pub fn add_data(&mut self, name: &str, data: Vec<Data>, append_data: bool)
Adds (or replaces) a named data stream.
When append_data is true the stream gets lower priority on timestamp
ties; when false (prepend) it wins ties.
Sourcepub fn remove_data(&mut self, name: &str, complete_remove: bool)
pub fn remove_data(&mut self, name: &str, complete_remove: bool)
Removes a named data stream.
Sourcepub fn set_index(&mut self, name: &str, index: usize)
pub fn set_index(&mut self, name: &str, index: usize)
Sets the cursor of a named stream to index (0-based).
Sourcepub fn reset_all_cursors(&mut self)
pub fn reset_all_cursors(&mut self)
Resets all stream cursors to the beginning.
Trait Implementations§
Source§impl Debug for BacktestDataIterator
impl Debug for BacktestDataIterator
Source§impl Default for BacktestDataIterator
impl Default for BacktestDataIterator
Source§fn default() -> BacktestDataIterator
fn default() -> BacktestDataIterator
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BacktestDataIterator
impl RefUnwindSafe for BacktestDataIterator
impl Send for BacktestDataIterator
impl Sync for BacktestDataIterator
impl Unpin for BacktestDataIterator
impl UnsafeUnpin for BacktestDataIterator
impl UnwindSafe for BacktestDataIterator
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more