#[repr(C)]
pub struct LeafNode {
Show 13 fields pub tag: u8, pub owner_slot: u8, pub order_type: u8, pub padding: [u8; 1], pub time_in_force: u16, pub padding2: [u8; 2], pub key: u128, pub owner: Pubkey, pub quantity: i64, pub timestamp: u64, pub peg_limit: i64, pub client_order_id: u64, pub reserved: [u8; 32],
}
Expand description

LeafNodes represent an order in the binary tree

Fields

tag: u8

NodeTag

owner_slot: u8

Index into the owning MangoAccount’s PerpOpenOrders

order_type: u8

PostOrderType, this was added for TradingView move order

padding: [u8; 1]time_in_force: u16

Time in seconds after timestamp at which the order expires. A value of 0 means no expiry.

padding2: [u8; 2]key: u128

The binary tree key, see new_node_key()

owner: Pubkey

Address of the owning MangoAccount

quantity: i64

Number of base lots to buy or sell, always >=1

timestamp: u64

The time the order was placed

peg_limit: i64

If the effective price of an oracle pegged order exceeds this limit, it will be considered invalid and may be removed.

Only applicable in the oracle_pegged OrderTree

client_order_id: u64

User defined id for this order, used in FillEvents

reserved: [u8; 32]

Implementations

The order’s price_data as stored in the key

Needs to be unpacked differently for fixed and oracle pegged orders.

Time at which this order will expire, u64::MAX if never

Returns if the order is expired at now_ts

Trait Implementations

Converts this type into a shared reference of the (usually inferred) input type.
Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes. Read more
Deserialize this instance from a slice of bytes.
Serialize this instance into a vector of bytes.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Casts the value.
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Casts the value.
Casts the value.
Self must have the same layout as the specified Bits except for the possible invalid bit patterns being checked during is_valid_bit_pattern. Read more
If this function returns true, then it must be valid to reinterpret bits as &Self. Read more
Casts the value.
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Performs the conversion.
Performs the conversion.
Casts the value.
Casts the value.
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
Casts the value.
Casts the value.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Casts the value.
Casts the value.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Casts the value.
Casts the value.