Skip to main content

decode_price_with_sentinel

Function decode_price_with_sentinel 

Source
pub fn decode_price_with_sentinel(
    bytes: &[u8],
    precision: u8,
    field: &'static str,
    row: usize,
) -> Result<Price, EncodingError>
Expand description

Decodes a [Price] from raw bytes, using precision 0 for sentinel values.

For order book data where sentinel values indicate empty levels.

ยงErrors

Returns an EncodingError::ParseError if the price value is out of bounds.