Skip to main content

InstrumentData

Struct InstrumentData 

Source
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>

Source

pub fn new_trades_binned( &mut self, data: impl ExactSizeIterator<Item = TradeTradeTimestamp<IS>>, )

Source

pub fn walk_new_trades( &mut self, data: impl ExactSizeIterator<Item = TradeTradeTimestamp<IS>>, )

Source

pub fn initialize_walk(&mut self, start_timestamp: Timestamp)

Source

pub async fn walk<const INTERVAL_NS: u64>( &mut self, walk_end_timestamp: &Timestamp, ) -> Option<&Timestamp>

Source

pub fn iter_recent_latest_trades_forward( &self, ) -> impl ExactSizeIterator<Item = &TradeTradeTimestamp<IS>> + Clone

Source

pub fn iter_recent_trades_forward( &self, count: Option<usize>, ) -> impl ExactSizeIterator<Item = &TradeTradeTimestamp<IS>> + Clone

Source

pub fn iter_reaggregate_trade_forward<T: TradeTimestamped>( &self, aggregation: &T, ) -> impl Iterator<Item = &TradeTradeTimestamp<IS>>

Source

pub fn reaggregate_trade_forward_slice<T: TradeTimestamped>( &self, aggregation: &T, ) -> &[TradeTradeTimestamp<IS>]

Source

pub fn iter_recent_trades_backward( &self, count: Option<usize>, ) -> impl Iterator<Item = &TradeTradeTimestamp<IS>>

Source

pub fn trades_forward_slice_from<P: FnMut(&TradeTradeTimestamp<IS>) -> bool>( &self, exclude: P, ) -> &[TradeTradeTimestamp<IS>]

Source

pub fn trades_forward_slice(&self) -> &[TradeTradeTimestamp<IS>]

Source

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>

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Az for T

Source§

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Source§

fn cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CheckedAs for T

Source§

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Source§

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<Src, Dst> LosslessTryInto<Dst> for Src
where Dst: LosslessTryFrom<Src>,

Source§

fn lossless_try_into(self) -> Option<Dst>

Performs the conversion.
Source§

impl<Src, Dst> LossyInto<Dst> for Src
where Dst: LossyFrom<Src>,

Source§

fn lossy_into(self) -> Dst

Performs the conversion.
Source§

impl<T> OverflowingAs for T

Source§

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Source§

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> SaturatingAs for T

Source§

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Source§

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> StrictAs for T

Source§

fn strict_as<Dst>(self) -> Dst
where T: StrictCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> StrictCastFrom<Src> for Dst
where Src: StrictCast<Dst>,

Source§

fn strict_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> UnwrappedAs for T

Source§

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Source§

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> WrappingAs for T

Source§

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Source§

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Source§

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.