//! This code was AUTOGENERATED using the Codama library.
/// InnerNodes and LeafNodes compose the binary tree of orders.
/// Each InnerNode has exactly two children, which are either InnerNodes
/// themselves, or LeafNodes. The children share the top `prefix_len` bits of
/// `key`. The left child has a 0 in the next bit, and the right a 1.
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Debug, Clone, borsh::BorshSerialize, borsh::BorshDeserialize, PartialEq)]
pub struct InnerNode {
pub tag: u8,
pub padding: [u8; 3],
/// number of highest `key` bits that all children share
/// e.g. if it's 2, the two highest bits of `key` will be the same on all
/// children
pub prefix_len: u32,
/// only the top `prefix_len` bits of `key` are relevant
pub key: u128,
/// indexes into `BookSide::nodes`
pub children: [u32; 2],
/// The earliest expiry timestamp for the left and right subtrees.
/// Needed to be able to find and remove expired orders without having to
/// iterate through the whole bookside.
pub child_earliest_expiry: [u64; 2],
#[cfg_attr(feature = "serde", serde(with = "serde_big_array::BigArray"))]
pub reserved: [u8; 40],
}