Enum phoenix::program::status::MarketStatus
source · #[repr(u64)]
pub enum MarketStatus {
Uninitialized,
Active,
PostOnly,
Paused,
Closed,
Tombstoned,
}Variants§
Uninitialized
Active
All new orders, placements, and reductions are accepted. Crossing the spread is permissionless.
PostOnly
Only places, reductions and withdrawals are accepted.
Paused
Only reductions and withdrawals are accepted.
Closed
Only reductions and withdrawals are accepted. The market authority can forcibly cancel all orders.
Tombstoned
Used to signal the market to be deleted. Can only be called in a Closed state where all orders and traders are removed from the book
Implementations§
source§impl MarketStatus
impl MarketStatus
pub fn valid_state_transition(&self, new_state: &MarketStatus) -> bool
pub fn assert_valid_state_transition( &self, new_state: &MarketStatus ) -> Result<(), ProgramError>
pub fn cross_allowed(&self) -> bool
pub fn post_allowed(&self) -> bool
pub fn reduce_allowed(&self) -> bool
Trait Implementations§
source§impl BorshDeserialize for MarketStatus
impl BorshDeserialize for MarketStatus
source§impl BorshSerialize for MarketStatus
impl BorshSerialize for MarketStatus
source§impl Clone for MarketStatus
impl Clone for MarketStatus
source§fn clone(&self) -> MarketStatus
fn clone(&self) -> MarketStatus
Returns a copy 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 MarketStatus
impl Debug for MarketStatus
source§impl Default for MarketStatus
impl Default for MarketStatus
source§impl Display for MarketStatus
impl Display for MarketStatus
source§impl From<u64> for MarketStatus
impl From<u64> for MarketStatus
source§impl PartialEq<MarketStatus> for MarketStatus
impl PartialEq<MarketStatus> for MarketStatus
source§fn eq(&self, other: &MarketStatus) -> bool
fn eq(&self, other: &MarketStatus) -> bool
This method tests for
self and other values to be equal, and is used
by ==.