#[repr(C)]pub struct FIFORestingOrder {
pub trader_index: u64,
pub num_base_lots: BaseLots,
pub last_valid_slot: u64,
pub last_valid_unix_timestamp_in_seconds: u64,
}Fields§
§trader_index: u64§num_base_lots: BaseLots§last_valid_slot: u64§last_valid_unix_timestamp_in_seconds: u64Implementations§
Source§impl FIFORestingOrder
impl FIFORestingOrder
pub fn new_default(trader_index: u64, num_base_lots: BaseLots) -> Self
pub fn new( trader_index: u64, num_base_lots: BaseLots, last_valid_slot: Option<u64>, last_valid_unix_timestamp_in_seconds: Option<u64>, ) -> Self
pub fn new_with_last_valid_slot( trader_index: u64, num_base_lots: BaseLots, last_valid_slot: u64, ) -> Self
pub fn new_with_last_valid_unix_timestamp( trader_index: u64, num_base_lots: BaseLots, last_valid_unix_timestamp_in_seconds: u64, ) -> Self
Trait Implementations§
Source§impl Clone for FIFORestingOrder
impl Clone for FIFORestingOrder
Source§fn clone(&self) -> FIFORestingOrder
fn clone(&self) -> FIFORestingOrder
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 FIFORestingOrder
impl Debug for FIFORestingOrder
Source§impl Default for FIFORestingOrder
impl Default for FIFORestingOrder
Source§fn default() -> FIFORestingOrder
fn default() -> FIFORestingOrder
Returns the “default value” for a type. Read more
Source§impl<MarketTraderId: Debug + PartialOrd + Ord + Default + Copy + Clone + Zeroable + Pod + BorshDeserialize + BorshSerialize, const BIDS_SIZE: usize, const ASKS_SIZE: usize, const NUM_SEATS: usize> Market<MarketTraderId, FIFOOrderId, FIFORestingOrder, OrderPacket> for FIFOMarket<MarketTraderId, BIDS_SIZE, ASKS_SIZE, NUM_SEATS>
impl<MarketTraderId: Debug + PartialOrd + Ord + Default + Copy + Clone + Zeroable + Pod + BorshDeserialize + BorshSerialize, const BIDS_SIZE: usize, const ASKS_SIZE: usize, const NUM_SEATS: usize> Market<MarketTraderId, FIFOOrderId, FIFORestingOrder, OrderPacket> for FIFOMarket<MarketTraderId, BIDS_SIZE, ASKS_SIZE, NUM_SEATS>
fn get_data_size(&self) -> usize
fn get_taker_fee_bps(&self) -> u64
fn get_tick_size(&self) -> QuoteLotsPerBaseUnitPerTick
fn get_base_lots_per_base_unit(&self) -> BaseLotsPerBaseUnit
fn get_sequence_number(&self) -> u64
fn get_collected_fee_amount(&self) -> QuoteLots
fn get_uncollected_fee_amount(&self) -> QuoteLots
fn get_registered_traders( &self, ) -> &dyn OrderedNodeAllocatorMap<MarketTraderId, TraderState>
fn get_trader_state(&self, trader_id: &MarketTraderId) -> Option<&TraderState>
fn get_trader_state_from_index(&self, index: u32) -> &TraderState
fn get_trader_index(&self, trader_id: &MarketTraderId) -> Option<u32>
fn get_trader_id_from_index(&self, trader_index: u32) -> MarketTraderId
fn get_book( &self, side: Side, ) -> &dyn OrderedNodeAllocatorMap<FIFOOrderId, FIFORestingOrder>
fn get_ladder(&self, levels: u64) -> Ladder
fn get_ladder_with_expiration( &self, levels: u64, last_valid_slot: Option<u64>, last_valid_unix_timestamp_in_seconds: Option<u64>, ) -> Ladder
fn get_typed_ladder(&self, levels: u64) -> TypedLadder
fn get_typed_ladder_with_expiration( &self, levels: u64, last_valid_slot: Option<u64>, last_valid_unix_timestamp_in_seconds: Option<u64>, ) -> TypedLadder
Source§impl RestingOrder for FIFORestingOrder
impl RestingOrder for FIFORestingOrder
impl Copy for FIFORestingOrder
impl Pod for FIFORestingOrder
Auto Trait Implementations§
impl Freeze for FIFORestingOrder
impl RefUnwindSafe for FIFORestingOrder
impl Send for FIFORestingOrder
impl Sync for FIFORestingOrder
impl Unpin for FIFORestingOrder
impl UnwindSafe for FIFORestingOrder
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