#[repr(u64)]pub enum MarketStatus {
Uninitialized = 0,
Active = 1,
PostOnly = 2,
Paused = 3,
Closed = 4,
Tombstoned = 5,
}Variants§
Uninitialized = 0
Active = 1
All new orders, placements, and reductions are accepted. Crossing the spread is permissionless.
PostOnly = 2
Only places, reductions and withdrawals are accepted.
Paused = 3
Only reductions and withdrawals are accepted.
Closed = 4
Only reductions and withdrawals are accepted. The market authority can forcibly cancel all orders.
Tombstoned = 5
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 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 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 for MarketStatus
impl PartialEq for MarketStatus
impl Copy for MarketStatus
impl Eq for MarketStatus
impl StructuralPartialEq for MarketStatus
Auto Trait Implementations§
impl Freeze for MarketStatus
impl RefUnwindSafe for MarketStatus
impl Send for MarketStatus
impl Sync for MarketStatus
impl Unpin for MarketStatus
impl UnwindSafe for MarketStatus
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> 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