#[repr(C)]
pub struct UserAccountHeader {
Show 13 fields pub tag: u64, pub market: Pubkey, pub owner: Pubkey, pub base_token_free: u64, pub base_token_locked: u64, pub quote_token_free: u64, pub quote_token_locked: u64, pub accumulated_rebates: u64, pub accumulated_maker_quote_volume: u64, pub accumulated_maker_base_volume: u64, pub accumulated_taker_quote_volume: u64, pub accumulated_taker_base_volume: u64, pub number_of_orders: u32, /* private fields */
}
Expand description

This header describes a user account’s state

Fields

tag: u64

This byte is used to verify and version the dex state

market: Pubkey

The user account’s assocatied DEX market

owner: Pubkey

The user account owner’s wallet

base_token_free: u64

The amount of base token available for settlement

base_token_locked: u64

The amount of base token currently locked in the orderbook

quote_token_free: u64

The amount of quote token available for settlement

quote_token_locked: u64

The amount of quote token currently locked in the orderbook

accumulated_rebates: u64

The all time quantity of rebates accumulated by this user account.

The actual rebates will always be transfer to the user account’s main balance. This field is just a metric.

accumulated_maker_quote_volume: u64

The accumulated maker quote volume of the user. This field is just a metric.

accumulated_maker_base_volume: u64

The accumulated maker quote volume of the user. This field is just a metric.

accumulated_taker_quote_volume: u64

The accumulated taker quote volume of the user. This field is just a metric.

accumulated_taker_base_volume: u64

The accumulated taker quote volume of the user. This field is just a metric.

number_of_orders: u32

The user account’s number of active orders.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
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

Returns the argument unchanged.

Calls U::from(self).

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

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
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.