pub struct BarResampler { /* private fields */ }Expand description
Aggregates OHLCV bars into calendar-aligned target bars.
Implementations§
Source§impl BarResampler
impl BarResampler
pub fn new(target_tf: Timeframe) -> Result<Self, TimeframeError>
pub fn with_utc_offset( target_tf: Timeframe, utc_offset_seconds: i32, ) -> Result<Self, TimeframeError>
pub fn reset(&mut self)
pub fn on_bar(&mut self, bar: &Bar) -> ResamplerOutput
Trait Implementations§
Source§impl Clone for BarResampler
impl Clone for BarResampler
Source§fn clone(&self) -> BarResampler
fn clone(&self) -> BarResampler
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 BarResampler
impl RefUnwindSafe for BarResampler
impl Send for BarResampler
impl Sync for BarResampler
impl Unpin for BarResampler
impl UnsafeUnpin for BarResampler
impl UnwindSafe for BarResampler
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