Enum dbn::RecordRefEnum

source ·
pub enum RecordRefEnum<'a> {
Show 13 variants Mbo(&'a MboMsg), Trade(&'a TradeMsg), Mbp1(&'a Mbp1Msg), Mbp10(&'a Mbp10Msg), Ohlcv(&'a OhlcvMsg), Status(&'a StatusMsg), InstrumentDef(&'a InstrumentDefMsg), Imbalance(&'a ImbalanceMsg), Stat(&'a StatMsg), Error(&'a ErrorMsg), SymbolMapping(&'a SymbolMappingMsg), System(&'a SystemMsg), Cbbo(&'a CbboMsg),
}
Expand description

An immutable reference to a DBN record of flexible type. Unlike RecordRef, this type allows matching.

Variants§

§

Mbo(&'a MboMsg)

A reference to a market-by-order message.

§

Trade(&'a TradeMsg)

A reference to a trade message.

§

Mbp1(&'a Mbp1Msg)

A reference to a market-by-price message with a book depth of 1.

§

Mbp10(&'a Mbp10Msg)

A reference to a market-by-price message with a book depth of 10.

§

Ohlcv(&'a OhlcvMsg)

A reference to an open, high, low, close, and volume message.

§

Status(&'a StatusMsg)

A reference to a trading status message.

§

InstrumentDef(&'a InstrumentDefMsg)

A reference to an instrument definition message.

§

Imbalance(&'a ImbalanceMsg)

A reference to an auction imbalance message.

§

Stat(&'a StatMsg)

A reference to a publisher statistic message.

§

Error(&'a ErrorMsg)

A reference to an error message from the Databento Live Subscription Gateway (LSG).

§

SymbolMapping(&'a SymbolMappingMsg)

A reference to a symbol mapping message.

§

System(&'a SystemMsg)

A reference to a non-error message from the Databento Live Subscription Gateway (LSG).

§

Cbbo(&'a CbboMsg)

A reference to a consolidated best bid and offer message.

Implementations§

source§

impl<'a> RecordRefEnum<'a>

source

pub fn to_owned(&self) -> RecordEnum

Converts the reference enum into an owned enum value.

Trait Implementations§

source§

impl<'a> Clone for RecordRefEnum<'a>

source§

fn clone(&self) -> RecordRefEnum<'a>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<'a> Debug for RecordRefEnum<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'a> From<&'a CbboMsg> for RecordRefEnum<'a>

source§

fn from(rec: &'a CbboMsg) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a ErrorMsg> for RecordRefEnum<'a>

source§

fn from(rec: &'a ErrorMsg) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a ImbalanceMsg> for RecordRefEnum<'a>

source§

fn from(rec: &'a ImbalanceMsg) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a InstrumentDefMsg> for RecordRefEnum<'a>

source§

fn from(rec: &'a InstrumentDefMsg) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a MboMsg> for RecordRefEnum<'a>

source§

fn from(rec: &'a MboMsg) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a Mbp10Msg> for RecordRefEnum<'a>

source§

fn from(rec: &'a Mbp10Msg) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a Mbp1Msg> for RecordRefEnum<'a>

source§

fn from(rec: &'a Mbp1Msg) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a OhlcvMsg> for RecordRefEnum<'a>

source§

fn from(rec: &'a OhlcvMsg) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a RecordEnum> for RecordRefEnum<'a>

source§

fn from(rec_enum: &'a RecordEnum) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a StatMsg> for RecordRefEnum<'a>

source§

fn from(rec: &'a StatMsg) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a StatusMsg> for RecordRefEnum<'a>

source§

fn from(rec: &'a StatusMsg) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a SymbolMappingMsg> for RecordRefEnum<'a>

source§

fn from(rec: &'a SymbolMappingMsg) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a SystemMsg> for RecordRefEnum<'a>

source§

fn from(rec: &'a SystemMsg) -> Self

Converts to this type from the input type.
source§

impl<'a> From<&'a TradeMsg> for RecordRefEnum<'a>

source§

fn from(rec: &'a TradeMsg) -> Self

Converts to this type from the input type.
source§

impl<'a> From<RecordRefEnum<'a>> for RecordRef<'a>

source§

fn from(rec_enum: RecordRefEnum<'a>) -> Self

Converts to this type from the input type.
source§

impl<'a> Record for RecordRefEnum<'a>

source§

fn header(&self) -> &RecordHeader

Returns a reference to the RecordHeader that comes at the beginning of all record types.
source§

fn raw_index_ts(&self) -> u64

Returns the raw primary timestamp for the record. Read more
source§

fn record_size(&self) -> usize

Returns the size of the record in bytes.
source§

fn rtype(&self) -> Result<RType>

Tries to convert the raw record type into an enum which is useful for exhaustive pattern matching. Read more
source§

fn publisher(&self) -> Result<Publisher>

Tries to convert the raw publisher_id into an enum which is useful for exhaustive pattern matching. Read more
source§

fn index_ts(&self) -> Option<OffsetDateTime>

Returns the primary timestamp for the record. Returns None if the primary timestamp contains the sentinel value for a null timestamp. Read more
source§

fn index_date(&self) -> Option<Date>

Returns the primary date for the record; the date component of the primary timestamp (index_ts()). Returns None if the primary timestamp contains the sentinel value for a null timestamp.
source§

impl<'a> TryFrom<RecordRef<'a>> for RecordRefEnum<'a>

§

type Error = Error

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

fn try_from(rec_ref: RecordRef<'a>) -> Result<Self, Error>

Performs the conversion.
source§

impl<'a> Copy for RecordRefEnum<'a>

Auto Trait Implementations§

§

impl<'a> Freeze for RecordRefEnum<'a>

§

impl<'a> RefUnwindSafe for RecordRefEnum<'a>

§

impl<'a> Send for RecordRefEnum<'a>

§

impl<'a> Sync for RecordRefEnum<'a>

§

impl<'a> Unpin for RecordRefEnum<'a>

§

impl<'a> UnwindSafe for RecordRefEnum<'a>

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> 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<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

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<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

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

§

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> Ungil for T
where T: Send,