#[repr(C)]pub struct RestingOrder { /* private fields */ }Implementations§
Source§impl RestingOrder
impl RestingOrder
pub fn new( trader_index: DataIndex, num_base_atoms: BaseAtoms, price: QuoteAtomsPerBaseAtom, sequence_number: u64, last_valid_slot: u32, is_bid: bool, order_type: OrderType, ) -> Result<Self, ProgramError>
pub fn get_trader_index(&self) -> DataIndex
pub fn get_num_base_atoms(&self) -> BaseAtoms
pub fn get_price(&self) -> QuoteAtomsPerBaseAtom
pub fn get_order_type(&self) -> OrderType
pub fn is_global(&self) -> bool
pub fn is_reverse(&self) -> bool
pub fn get_reverse_spread(self) -> u16
pub fn set_reverse_spread(&mut self, spread: u16)
pub fn get_sequence_number(&self) -> u64
pub fn is_expired(&self, current_slot: u32) -> bool
pub fn get_is_bid(&self) -> bool
pub fn reduce(&mut self, size: BaseAtoms) -> ProgramResult
pub fn increase(&mut self, size: BaseAtoms) -> ProgramResult
Trait Implementations§
Source§impl Clone for RestingOrder
impl Clone for RestingOrder
Source§fn clone(&self) -> RestingOrder
fn clone(&self) -> RestingOrder
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 RestingOrder
impl Debug for RestingOrder
Source§impl Default for RestingOrder
impl Default for RestingOrder
Source§fn default() -> RestingOrder
fn default() -> RestingOrder
Returns the “default value” for a type. Read more
Source§impl Display for RestingOrder
impl Display for RestingOrder
Source§impl Ord for RestingOrder
impl Ord for RestingOrder
Source§impl PartialEq for RestingOrder
impl PartialEq for RestingOrder
Source§impl PartialOrd for RestingOrder
impl PartialOrd for RestingOrder
impl Copy for RestingOrder
impl Eq for RestingOrder
impl Pod for RestingOrder
Auto Trait Implementations§
impl Freeze for RestingOrder
impl RefUnwindSafe for RestingOrder
impl Send for RestingOrder
impl Sync for RestingOrder
impl Unpin for RestingOrder
impl UnwindSafe for RestingOrder
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> DerefOrBorrow<T> for Twhere
T: ?Sized,
impl<T> DerefOrBorrow<T> for Twhere
T: ?Sized,
fn deref_or_borrow(&self) -> &T
Source§impl<T> DerefOrBorrowMut<T> for Twhere
T: ?Sized,
impl<T> DerefOrBorrowMut<T> for Twhere
T: ?Sized,
fn deref_or_borrow_mut(&mut self) -> &mut T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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