Skip to main content

encode_kind

Function encode_kind 

Source
pub const fn encode_kind(kind: OrderKind) -> u8
Expand description

Encode an OrderKind into its flag bits.

§Arguments

  • kind — the order kind to encode.

§Returns

A u8 with bit 0 set to 0 for OrderKind::Sell or 1 for OrderKind::Buy.