Skip to main content

decode_qty_scaled_allow_zero

Function decode_qty_scaled_allow_zero 

Source
pub fn decode_qty_scaled_allow_zero(
    scaled: i64,
    scale: Option<u32>,
    symbol: Option<String>,
    symbol_id: Option<u32>,
) -> Option<Quantity>
Expand description

Decode qty where zero is meaningful (e.g. fully filled leaves_qty / cum_qty).

Negative wire values are invalid and map to None (corruption), distinct from a present zero quantity.