Struct dex_v3::state::UserAccountHeader[][src]

pub struct UserAccountHeader {
    pub tag: AccountTag,
    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 number_of_orders: u32,
}
Expand description

This header describes a user account’s state

Fields

tag: AccountTag

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.

number_of_orders: u32

The user account’s number of active orders.

Trait Implementations

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.

Is initialized

The length, in bytes, of the packed representation

Get the packed length

Unpack from slice and check if initialized

Unpack from slice without checking if initialized

Pack into slice

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

Performs the conversion.

Performs the conversion.

Should always be Self

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.