pub struct ResamplerOutput {
pub completed_bar: Option<Bar>,
pub current_unconfirmed: Bar,
pub gap_buckets: u32,
}Fields§
§completed_bar: Option<Bar>The just-closed target-timeframe bar, if this input bar started a new bucket.
completed_bar.timestamp is the bucket’s open timestamp (see
Timeframe::bucket_close for the corresponding close timestamp) — the same convention
Bar::timestamp uses everywhere else in this crate.
current_unconfirmed: BarThe still-forming bucket as of this input bar. Reading this is a deliberate lookahead/
repaint risk (a bar that is still forming): its OHLC will keep changing
until the bucket closes. Prefer ConfirmedResampler when only confirmed HTF values may
be consumed.
gap_buckets: u32Count of whole target-timeframe buckets with no incoming bars between the previous
completed bucket and this one (0 = no gap, i.e. contiguous). Always 0 for
Timeframe::Month, whose bucket width is not a fixed duration (see
Timeframe::fixed_seconds), and for the very first bucket (no prior bucket to compare
against). Assumes bars are fed in non-decreasing timestamp order, as the whole resampler
does.
Trait Implementations§
Source§impl Clone for ResamplerOutput
impl Clone for ResamplerOutput
Source§fn clone(&self) -> ResamplerOutput
fn clone(&self) -> ResamplerOutput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more