#[repr(C)]pub enum Data {
Delta(OrderBookDelta),
Deltas(OrderBookDeltas_API),
Depth10(OrderBookDepth10),
Quote(QuoteTick),
Trade(TradeTick),
Bar(Bar),
}
Expand description
A built-in Nautilus data type.
Not recommended for storing large amounts of data, as the largest variant is significantly larger (10x) than the smallest.
Variants§
Delta(OrderBookDelta)
Deltas(OrderBookDeltas_API)
Depth10(OrderBookDepth10)
Quote(QuoteTick)
Trade(TradeTick)
Bar(Bar)
Implementations§
Source§impl Data
impl Data
Sourcepub fn instrument_id(&self) -> InstrumentId
pub fn instrument_id(&self) -> InstrumentId
Returns the instrument ID for the data.
Sourcepub fn is_order_book_data(&self) -> bool
pub fn is_order_book_data(&self) -> bool
Returns whether the data is a type of order book data.
Trait Implementations§
Source§impl From<OrderBookDelta> for Data
impl From<OrderBookDelta> for Data
Source§fn from(value: OrderBookDelta) -> Self
fn from(value: OrderBookDelta) -> Self
Converts to this type from the input type.
Source§impl From<OrderBookDeltas_API> for Data
impl From<OrderBookDeltas_API> for Data
Source§fn from(value: OrderBookDeltas_API) -> Self
fn from(value: OrderBookDeltas_API) -> Self
Converts to this type from the input type.
Source§impl From<OrderBookDepth10> for Data
impl From<OrderBookDepth10> for Data
Source§fn from(value: OrderBookDepth10) -> Self
fn from(value: OrderBookDepth10) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Data
Auto Trait Implementations§
impl Freeze for Data
impl RefUnwindSafe for Data
impl Send for Data
impl Sync for Data
impl Unpin for Data
impl UnwindSafe for Data
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