pub struct OrderBook {Show 15 fields
pub template_id: i32,
pub symbol: Option<String>,
pub exchange: Option<String>,
pub presence_bits: Option<u32>,
pub update_type: Option<i32>,
pub bid_price: Vec<f64>,
pub bid_size: Vec<i32>,
pub bid_orders: Vec<i32>,
pub impl_bid_size: Vec<i32>,
pub ask_price: Vec<f64>,
pub ask_size: Vec<i32>,
pub ask_orders: Vec<i32>,
pub impl_ask_size: Vec<i32>,
pub ssboe: Option<i32>,
pub usecs: Option<i32>,
}Expand description
PB_OFFSET = 100000 , is the offset added for each MNM field id
Fields§
§template_id: i32PB_OFFSET + MNM_TEMPLATE_ID
symbol: Option<String>PB_OFFSET + MNM_SYMBOL
exchange: Option<String>PB_OFFSET + MNM_EXCHANGE
presence_bits: Option<u32>PB_OFFSET + MNM_PRICING_INDICATOR
update_type: Option<i32>PB_OFFSET + MNM_MARKET_DEPTH_UPDATE_TYPE
bid_price: Vec<f64>PB_OFFSET + MNM_MARKET_DEPTH_BID_PRICE
bid_size: Vec<i32>PB_OFFSET + MNM_MARKET_DEPTH_BID_SIZE
bid_orders: Vec<i32>PB_OFFSET + MNM_MARKET_DEPTH_BID_NO_OF_ORDERS
impl_bid_size: Vec<i32>PB_OFFSET + MNM_MARKET_DEPTH_IMPLICIT_BID_SIZE
ask_price: Vec<f64>PB_OFFSET + MNM_MARKET_DEPTH_ASK_PRICE
ask_size: Vec<i32>PB_OFFSET + MNM_MARKET_DEPTH_ASK_SIZE
ask_orders: Vec<i32>PB_OFFSET + MNM_MARKET_DEPTH_ASK_NO_OF_ORDERS
impl_ask_size: Vec<i32>PB_OFFSET + MNM_MARKET_DEPTH_IMPLICIT_ASK_SIZE
ssboe: Option<i32>PB_OFFSET + MNM_SECONDS_SINCE_BOE
usecs: Option<i32>PB_OFFSET + MNM_USECS
Implementations§
Source§impl OrderBook
impl OrderBook
Sourcepub fn symbol(&self) -> &str
pub fn symbol(&self) -> &str
Returns the value of symbol, or the default value if symbol is unset.
Sourcepub fn exchange(&self) -> &str
pub fn exchange(&self) -> &str
Returns the value of exchange, or the default value if exchange is unset.
Sourcepub fn presence_bits(&self) -> u32
pub fn presence_bits(&self) -> u32
Returns the value of presence_bits, or the default value if presence_bits is unset.
Sourcepub fn update_type(&self) -> UpdateType
pub fn update_type(&self) -> UpdateType
Returns the enum value of update_type, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_update_type(&mut self, value: UpdateType)
pub fn set_update_type(&mut self, value: UpdateType)
Sets update_type to the provided enum value.
Trait Implementations§
Source§impl Message for OrderBook
impl Message for OrderBook
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.