pub struct TimeRule { /* private fields */ }Expand description
The classic time based aggregation rule, creating a new candle every n seconds
Implementations§
Source§impl TimeRule
impl TimeRule
Sourcepub fn new(
period_ms: MillisecondPeriod,
trade_timestamp_resolution: TimestampResolution,
) -> Self
pub fn new( period_ms: MillisecondPeriod, trade_timestamp_resolution: TimestampResolution, ) -> Self
Create a new instance of the time rule, with a given candle period in seconds
§Arguments:
period_ms: How many milliseconds a candle will contain.
trade_timestamp_resolution: The resolution each Trade timestamp will have
Trait Implementations§
Source§impl<C, T> AggregationRule<C, T> for TimeRulewhere
C: ModularCandle<T>,
T: TakerTrade,
impl<C, T> AggregationRule<C, T> for TimeRulewhere
C: ModularCandle<T>,
T: TakerTrade,
Auto Trait Implementations§
impl Freeze for TimeRule
impl RefUnwindSafe for TimeRule
impl Send for TimeRule
impl Sync for TimeRule
impl Unpin for TimeRule
impl UnwindSafe for TimeRule
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