pub struct BarAggregatorCore { /* private fields */ }
Expand description
Provides a means of aggregating specified bar types and sending to a registered handler.
Implementations§
source§impl BarAggregatorCore
impl BarAggregatorCore
sourcepub fn new(
instrument: &InstrumentAny,
bar_type: BarType,
handler: fn(_: Bar),
await_partial: bool,
) -> Self
pub fn new( instrument: &InstrumentAny, bar_type: BarType, handler: fn(_: Bar), await_partial: bool, ) -> Self
Creates a new BarAggregatorCore
instance.
§Panics
This function panics:
- If
instrument.id
is not equal to thebar_type.instrument_id
. - If
bar_type.aggregation_source
is not equal toAggregationSource::Internal
.
pub fn set_await_partial(&mut self, value: bool)
sourcepub fn set_partial(&mut self, partial_bar: Bar)
pub fn set_partial(&mut self, partial_bar: Bar)
Set the initial values for a partially completed bar.
Auto Trait Implementations§
impl Freeze for BarAggregatorCore
impl RefUnwindSafe for BarAggregatorCore
impl Send for BarAggregatorCore
impl Sync for BarAggregatorCore
impl Unpin for BarAggregatorCore
impl UnwindSafe for BarAggregatorCore
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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