11use crate :: {
2- record:: CbboMsg , Error , ErrorMsg , ImbalanceMsg , InstrumentDefMsg , MboMsg , Mbp10Msg , Mbp1Msg ,
3- OhlcvMsg , RType , Record , RecordMut , RecordRef , StatMsg , StatusMsg , SymbolMappingMsg , SystemMsg ,
4- TradeMsg ,
2+ record:: CbboMsg , BboMsg , Error , ErrorMsg , ImbalanceMsg , InstrumentDefMsg , MboMsg , Mbp10Msg ,
3+ Mbp1Msg , OhlcvMsg , RType , Record , RecordMut , RecordRef , StatMsg , StatusMsg , SymbolMappingMsg ,
4+ SystemMsg , TradeMsg ,
55} ;
66
77/// An owned DBN record type of flexible type. Unlike [`RecordRef`], this type allows
@@ -36,6 +36,8 @@ pub enum RecordEnum {
3636 System ( SystemMsg ) ,
3737 /// A consolidated best bid and offer message.
3838 Cbbo ( CbboMsg ) ,
39+ /// A subsampled market-by-price message with a book depth of 1.
40+ Bbo ( BboMsg ) ,
3941}
4042
4143/// An immutable reference to a DBN record of flexible type. Unlike [`RecordRef`], this
@@ -72,6 +74,8 @@ pub enum RecordRefEnum<'a> {
7274 System ( & ' a SystemMsg ) ,
7375 /// A reference to a consolidated best bid and offer message.
7476 Cbbo ( & ' a CbboMsg ) ,
77+ /// A subsampled market-by-price message with a book depth of 1.
78+ Bbo ( & ' a BboMsg ) ,
7579}
7680
7781impl < ' a > From < & ' a RecordEnum > for RecordRefEnum < ' a > {
@@ -90,6 +94,7 @@ impl<'a> From<&'a RecordEnum> for RecordRefEnum<'a> {
9094 RecordEnum :: SymbolMapping ( rec) => Self :: SymbolMapping ( rec) ,
9195 RecordEnum :: System ( rec) => Self :: System ( rec) ,
9296 RecordEnum :: Cbbo ( rec) => Self :: Cbbo ( rec) ,
97+ RecordEnum :: Bbo ( rec) => Self :: Bbo ( rec) ,
9398 }
9499 }
95100}
@@ -112,6 +117,7 @@ impl<'a> RecordRefEnum<'a> {
112117 Self :: SymbolMapping ( rec) => RecordEnum :: from ( ( * rec) . clone ( ) ) ,
113118 Self :: System ( rec) => RecordEnum :: from ( ( * rec) . clone ( ) ) ,
114119 Self :: Cbbo ( rec) => RecordEnum :: from ( ( * rec) . clone ( ) ) ,
120+ Self :: Bbo ( rec) => RecordEnum :: Bbo ( ( * rec) . clone ( ) ) ,
115121 }
116122 }
117123}
@@ -313,6 +319,7 @@ impl Record for RecordEnum {
313319 RecordEnum :: SymbolMapping ( rec) => rec. header ( ) ,
314320 RecordEnum :: System ( rec) => rec. header ( ) ,
315321 RecordEnum :: Cbbo ( rec) => rec. header ( ) ,
322+ RecordEnum :: Bbo ( rec) => rec. header ( ) ,
316323 }
317324 }
318325
@@ -331,6 +338,7 @@ impl Record for RecordEnum {
331338 RecordEnum :: SymbolMapping ( rec) => rec. raw_index_ts ( ) ,
332339 RecordEnum :: System ( rec) => rec. raw_index_ts ( ) ,
333340 RecordEnum :: Cbbo ( rec) => rec. raw_index_ts ( ) ,
341+ RecordEnum :: Bbo ( rec) => rec. raw_index_ts ( ) ,
334342 }
335343 }
336344}
@@ -351,6 +359,7 @@ impl RecordMut for RecordEnum {
351359 RecordEnum :: SymbolMapping ( rec) => rec. header_mut ( ) ,
352360 RecordEnum :: System ( rec) => rec. header_mut ( ) ,
353361 RecordEnum :: Cbbo ( rec) => rec. header_mut ( ) ,
362+ RecordEnum :: Bbo ( rec) => rec. header_mut ( ) ,
354363 }
355364 }
356365}
@@ -371,6 +380,7 @@ impl<'a> Record for RecordRefEnum<'a> {
371380 RecordRefEnum :: SymbolMapping ( rec) => rec. header ( ) ,
372381 RecordRefEnum :: System ( rec) => rec. header ( ) ,
373382 RecordRefEnum :: Cbbo ( rec) => rec. header ( ) ,
383+ RecordRefEnum :: Bbo ( rec) => rec. header ( ) ,
374384 }
375385 }
376386
@@ -389,6 +399,7 @@ impl<'a> Record for RecordRefEnum<'a> {
389399 RecordRefEnum :: SymbolMapping ( rec) => rec. raw_index_ts ( ) ,
390400 RecordRefEnum :: System ( rec) => rec. raw_index_ts ( ) ,
391401 RecordRefEnum :: Cbbo ( rec) => rec. raw_index_ts ( ) ,
402+ RecordRefEnum :: Bbo ( rec) => rec. raw_index_ts ( ) ,
392403 }
393404 }
394405}
0 commit comments