pub enum Market<'a> {
V1(RefMut<'a, MarketState>),
V2(RefMut<'a, MarketStateV2>),
}Variants§
V1(RefMut<'a, MarketState>)
V2(RefMut<'a, MarketStateV2>)
Implementations§
Source§impl<'a> Market<'a>
impl<'a> Market<'a>
pub fn load( market_account: &'a AccountInfo<'_>, program_id: &Pubkey, allow_disabled: bool, ) -> DexResult<Self>
pub fn account_flags(account_data: &[u8]) -> DexResult<BitFlags<AccountFlag>>
pub fn load_orders_mut( &self, orders_account: &'a AccountInfo<'_>, owner_account: Option<&AccountInfo<'_>>, program_id: &Pubkey, rent: Option<Rent>, open_orders_authority: Option<SignerAccount<'_, '_>>, ) -> DexResult<RefMut<'a, OpenOrders>>
Methods from Deref<Target = MarketState>§
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§
Auto Trait Implementations§
impl<'a> Freeze for Market<'a>
impl<'a> !RefUnwindSafe for Market<'a>
impl<'a> !Send for Market<'a>
impl<'a> !Sync for Market<'a>
impl<'a> Unpin for Market<'a>
impl<'a> !UnwindSafe for Market<'a>
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> 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