#[repr(packed(1))]pub struct MarketState {Show 20 fields
pub account_flags: u64,
pub own_address: [u64; 4],
pub vault_signer_nonce: u64,
pub coin_mint: [u64; 4],
pub pc_mint: [u64; 4],
pub coin_vault: [u64; 4],
pub coin_deposits_total: u64,
pub coin_fees_accrued: u64,
pub pc_vault: [u64; 4],
pub pc_deposits_total: u64,
pub pc_fees_accrued: u64,
pub pc_dust_threshold: u64,
pub req_q: [u64; 4],
pub event_q: [u64; 4],
pub bids: [u64; 4],
pub asks: [u64; 4],
pub coin_lot_size: u64,
pub pc_lot_size: u64,
pub fee_rate_bps: u64,
pub referrer_rebates_accrued: u64,
}Fields§
§account_flags: u64§own_address: [u64; 4]§vault_signer_nonce: u64§coin_mint: [u64; 4]§pc_mint: [u64; 4]§coin_vault: [u64; 4]§coin_deposits_total: u64§coin_fees_accrued: u64§pc_vault: [u64; 4]§pc_deposits_total: u64§pc_fees_accrued: u64§pc_dust_threshold: u64§req_q: [u64; 4]§event_q: [u64; 4]§bids: [u64; 4]§asks: [u64; 4]§coin_lot_size: u64§pc_lot_size: u64§fee_rate_bps: u64§referrer_rebates_accrued: u64Implementations§
Source§impl MarketState
impl MarketState
pub fn load<'a>( market_account: &'a AccountInfo<'_>, program_id: &Pubkey, allow_disabled: bool, ) -> DexResult<RefMut<'a, Self>>
pub fn check_flags(&self, allow_disabled: bool) -> DexResult
pub fn load_bids_mut<'a>( &self, bids: &'a AccountInfo<'_>, ) -> DexResult<RefMut<'a, Slab>>
pub fn load_asks_mut<'a>( &self, asks: &'a AccountInfo<'_>, ) -> DexResult<RefMut<'a, Slab>>
Trait Implementations§
Source§impl Clone for MarketState
impl Clone for MarketState
Source§fn clone(&self) -> MarketState
fn clone(&self) -> MarketState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MarketState
impl Debug for MarketState
impl Copy for MarketState
impl Pod for MarketState
impl TriviallyTransmutable for MarketState
Auto Trait Implementations§
impl Freeze for MarketState
impl RefUnwindSafe for MarketState
impl Send for MarketState
impl Sync for MarketState
impl Unpin for MarketState
impl UnwindSafe for MarketState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more