pub struct InstrumentData<'instrument_data: 'aggregated_data, 'aggregated_data, IS: InstrumentSpec> { /* private fields */ }Expand description
Primary hot storage of securities enabled foundational data used for further aggregation and permanent storage.
Implementations§
Source§impl<'instrument_data, 'aggregated_data, IS: InstrumentSpec> InstrumentData<'instrument_data, 'aggregated_data, IS>
impl<'instrument_data, 'aggregated_data, IS: InstrumentSpec> InstrumentData<'instrument_data, 'aggregated_data, IS>
pub fn new_trades_binned( &mut self, data: impl ExactSizeIterator<Item = TradeTradeTimestamp<IS>>, )
pub fn walk_new_trades( &mut self, data: impl ExactSizeIterator<Item = TradeTradeTimestamp<IS>>, )
pub fn initialize_walk(&mut self, start_timestamp: Timestamp)
pub async fn walk<const INTERVAL_NS: u64>( &mut self, walk_end_timestamp: &Timestamp, ) -> Option<&Timestamp>
pub fn iter_recent_latest_trades_forward( &self, ) -> impl ExactSizeIterator<Item = &TradeTradeTimestamp<IS>> + Clone
pub fn iter_recent_trades_forward( &self, count: Option<usize>, ) -> impl ExactSizeIterator<Item = &TradeTradeTimestamp<IS>> + Clone
pub fn iter_reaggregate_trade_forward<T: TradeTimestamped>( &self, aggregation: &T, ) -> impl Iterator<Item = &TradeTradeTimestamp<IS>>
pub fn reaggregate_trade_forward_slice<T: TradeTimestamped>( &self, aggregation: &T, ) -> &[TradeTradeTimestamp<IS>]
pub fn iter_recent_trades_backward( &self, count: Option<usize>, ) -> impl Iterator<Item = &TradeTradeTimestamp<IS>>
pub fn trades_forward_slice_from<P: FnMut(&TradeTradeTimestamp<IS>) -> bool>( &self, exclude: P, ) -> &[TradeTradeTimestamp<IS>]
pub fn trades_forward_slice(&self) -> &[TradeTradeTimestamp<IS>]
pub fn trades_new_recent_forward_slice(&self) -> &[TradeTradeTimestamp<IS>]
Trait Implementations§
Source§impl<'instrument_data: 'aggregated_data, 'aggregated_data, IS: InstrumentSpec> Default for InstrumentData<'instrument_data, 'aggregated_data, IS>
impl<'instrument_data: 'aggregated_data, 'aggregated_data, IS: InstrumentSpec> Default for InstrumentData<'instrument_data, 'aggregated_data, IS>
Auto Trait Implementations§
impl<'instrument_data, 'aggregated_data, IS> Freeze for InstrumentData<'instrument_data, 'aggregated_data, IS>where
Box<FixedHotData<'instrument_data, 'aggregated_data, 100, IS, StdTrades<'instrument_data, IS>, TradeTradeTimestamp<IS>>>: Freeze,
FlexBinnedTimePointData<'instrument_data, 'aggregated_data, IS, TradeTradeTimestamp<IS>, StdTrades<'instrument_data, IS>, const {
Duration::hours(1)
.num_nanoseconds()
.unwrap() as u64
}>: Freeze,
impl<'instrument_data, 'aggregated_data, IS> RefUnwindSafe for InstrumentData<'instrument_data, 'aggregated_data, IS>where
Box<FixedHotData<'instrument_data, 'aggregated_data, 100, IS, StdTrades<'instrument_data, IS>, TradeTradeTimestamp<IS>>>: RefUnwindSafe,
FlexBinnedTimePointData<'instrument_data, 'aggregated_data, IS, TradeTradeTimestamp<IS>, StdTrades<'instrument_data, IS>, const {
Duration::hours(1)
.num_nanoseconds()
.unwrap() as u64
}>: RefUnwindSafe,
impl<'instrument_data, 'aggregated_data, IS> Send for InstrumentData<'instrument_data, 'aggregated_data, IS>where
Box<FixedHotData<'instrument_data, 'aggregated_data, 100, IS, StdTrades<'instrument_data, IS>, TradeTradeTimestamp<IS>>>: Send,
FlexBinnedTimePointData<'instrument_data, 'aggregated_data, IS, TradeTradeTimestamp<IS>, StdTrades<'instrument_data, IS>, const {
Duration::hours(1)
.num_nanoseconds()
.unwrap() as u64
}>: Send,
impl<'instrument_data, 'aggregated_data, IS> Sync for InstrumentData<'instrument_data, 'aggregated_data, IS>where
Box<FixedHotData<'instrument_data, 'aggregated_data, 100, IS, StdTrades<'instrument_data, IS>, TradeTradeTimestamp<IS>>>: Sync,
FlexBinnedTimePointData<'instrument_data, 'aggregated_data, IS, TradeTradeTimestamp<IS>, StdTrades<'instrument_data, IS>, const {
Duration::hours(1)
.num_nanoseconds()
.unwrap() as u64
}>: Sync,
impl<'instrument_data, 'aggregated_data, IS> Unpin for InstrumentData<'instrument_data, 'aggregated_data, IS>where
Box<FixedHotData<'instrument_data, 'aggregated_data, 100, IS, StdTrades<'instrument_data, IS>, TradeTradeTimestamp<IS>>>: Unpin,
FlexBinnedTimePointData<'instrument_data, 'aggregated_data, IS, TradeTradeTimestamp<IS>, StdTrades<'instrument_data, IS>, const {
Duration::hours(1)
.num_nanoseconds()
.unwrap() as u64
}>: Unpin,
impl<'instrument_data, 'aggregated_data, IS> UnsafeUnpin for InstrumentData<'instrument_data, 'aggregated_data, IS>where
Box<FixedHotData<'instrument_data, 'aggregated_data, 100, IS, StdTrades<'instrument_data, IS>, TradeTradeTimestamp<IS>>>: UnsafeUnpin,
FlexBinnedTimePointData<'instrument_data, 'aggregated_data, IS, TradeTradeTimestamp<IS>, StdTrades<'instrument_data, IS>, const {
Duration::hours(1)
.num_nanoseconds()
.unwrap() as u64
}>: UnsafeUnpin,
impl<'instrument_data, 'aggregated_data, IS> UnwindSafe for InstrumentData<'instrument_data, 'aggregated_data, IS>where
Box<FixedHotData<'instrument_data, 'aggregated_data, 100, IS, StdTrades<'instrument_data, IS>, TradeTradeTimestamp<IS>>>: UnwindSafe,
FlexBinnedTimePointData<'instrument_data, 'aggregated_data, IS, TradeTradeTimestamp<IS>, StdTrades<'instrument_data, IS>, const {
Duration::hours(1)
.num_nanoseconds()
.unwrap() as u64
}>: UnwindSafe,
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
impl<Src, Dst> LosslessTryInto<Dst> for Srcwhere
Dst: LosslessTryFrom<Src>,
Source§fn lossless_try_into(self) -> Option<Dst>
fn lossless_try_into(self) -> Option<Dst>
Performs the conversion.
Source§impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
impl<Src, Dst> LossyInto<Dst> for Srcwhere
Dst: LossyFrom<Src>,
Source§fn lossy_into(self) -> Dst
fn lossy_into(self) -> Dst
Performs the conversion.
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Casts the value.
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
Source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.