pub enum DataRef<'a> {
Show 14 variants
BookDelta(&'a OrderBookDelta),
BookDeltas(&'a OrderBookDeltas),
BookDepth10(&'a OrderBookDepth10),
Quote(&'a QuoteTick),
Trade(&'a TradeTick),
Bar(&'a Bar),
MarkPrice(&'a MarkPriceUpdate),
IndexPrice(&'a IndexPriceUpdate),
FundingRate(&'a FundingRateUpdate),
OptionGreeks(&'a OptionGreeks),
InstrumentStatus(&'a InstrumentStatus),
InstrumentClose(&'a InstrumentClose),
Custom(&'a CustomData),
Defi(&'a DefiData),
}Expand description
A borrowed view of a built-in Nautilus data type.
Variants§
BookDelta(&'a OrderBookDelta)
BookDeltas(&'a OrderBookDeltas)
BookDepth10(&'a OrderBookDepth10)
Quote(&'a QuoteTick)
Trade(&'a TradeTick)
Bar(&'a Bar)
MarkPrice(&'a MarkPriceUpdate)
IndexPrice(&'a IndexPriceUpdate)
FundingRate(&'a FundingRateUpdate)
OptionGreeks(&'a OptionGreeks)
InstrumentStatus(&'a InstrumentStatus)
InstrumentClose(&'a InstrumentClose)
Custom(&'a CustomData)
Defi(&'a DefiData)
Implementations§
Source§impl DataRef<'_>
impl DataRef<'_>
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§
impl<'a> Copy for DataRef<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for DataRef<'a>
impl<'a> !UnwindSafe for DataRef<'a>
impl<'a> Freeze for DataRef<'a>
impl<'a> Send for DataRef<'a>
impl<'a> Sync for DataRef<'a>
impl<'a> Unpin for DataRef<'a>
impl<'a> UnsafeUnpin for DataRef<'a>
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