pub enum DataBatch {
Show 15 variants
Instrument(BatchView<InstrumentAny>),
BookDelta(BatchView<OrderBookDelta>),
BookDeltas(BatchView<OrderBookDeltas>),
BookDepth(BatchView<OrderBookDepth>),
Quote(BatchView<QuoteTick>),
Trade(BatchView<TradeTick>),
Bar(BatchView<Bar>),
MarkPrice(BatchView<MarkPriceUpdate>),
IndexPrice(BatchView<IndexPriceUpdate>),
FundingRate(BatchView<FundingRateUpdate>),
OptionGreeks(BatchView<OptionGreeks>),
InstrumentStatus(BatchView<InstrumentStatus>),
InstrumentClose(BatchView<InstrumentClose>),
Custom(BatchView<CustomData>),
Defi(BatchView<DefiData>),
}Expand description
Shared typed batch used by replay and catalog fan-out paths.
Variants§
Instrument(BatchView<InstrumentAny>)
BookDelta(BatchView<OrderBookDelta>)
BookDeltas(BatchView<OrderBookDeltas>)
BookDepth(BatchView<OrderBookDepth>)
Quote(BatchView<QuoteTick>)
Trade(BatchView<TradeTick>)
Bar(BatchView<Bar>)
MarkPrice(BatchView<MarkPriceUpdate>)
IndexPrice(BatchView<IndexPriceUpdate>)
FundingRate(BatchView<FundingRateUpdate>)
OptionGreeks(BatchView<OptionGreeks>)
InstrumentStatus(BatchView<InstrumentStatus>)
InstrumentClose(BatchView<InstrumentClose>)
Custom(BatchView<CustomData>)
Defi(BatchView<DefiData>)
Implementations§
Source§impl DataBatch
impl DataBatch
Sourcepub fn from_data_vec_for_type(
data_type: &NautilusDataType,
data: Vec<Data>,
) -> Result<Self>
pub fn from_data_vec_for_type( data_type: &NautilusDataType, data: Vec<Data>, ) -> Result<Self>
Sourcepub fn from_data_vec_grouped(data: &[Data]) -> Result<Vec<Self>>
pub fn from_data_vec_grouped(data: &[Data]) -> Result<Vec<Self>>
Groups mixed compatibility rows into typed batches.
Data::BookDeltas values retain their event-batch boundary in a separate typed batch.
§Errors
Returns an error if a row cannot be represented by a typed batch.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn data_type_name(&self) -> &'static str
pub fn data_type_name(&self) -> &'static str
Returns the storage-family name of this batch’s data type.
pub fn is_monotonically_increasing_by_init(&self) -> bool
pub fn get(&self, index: usize) -> Option<DataRef<'_>>
pub fn aligned_chunk( &self, start: usize, chunk_size: Option<usize>, ) -> Option<(Self, usize)>
pub fn slice(&self, start: usize, end: usize) -> Self
pub fn to_data_vec_for_compat(&self) -> Vec<Data>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for DataBatch
impl !UnwindSafe for DataBatch
impl Freeze for DataBatch
impl Send for DataBatch
impl Sync for DataBatch
impl Unpin for DataBatch
impl UnsafeUnpin for DataBatch
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