[−][src]Struct solana_exchange_api::exchange_state::OrderInfo
Trade accounts are populated with this structure
Fields
owner: Pubkey
Owner of the trade order
direction: Direction
Direction of the exchange
pair: AssetPair
Token pair indicating two tokens to exchange, first is primary
tokens: u64
Number of tokens to exchange; primary or secondary depending on direction. Once this number goes to zero this trade order will be converted into a regular token account
price: u64
Scaled price of the secondary token given the primary is equal to the scale value If scale is 1 and price is 2 then ratio is 1:2 or 1 primary token for 2 secondary tokens
tokens_settled: u64
Number of tokens that have been settled so far. These nay be transferred to another token account by the owner.
Methods
impl OrderInfo
[src]
pub fn pair(self, pair: AssetPair) -> Self
[src]
pub fn direction(self, direction: Direction) -> Self
[src]
pub fn tokens(self, tokens: u64) -> Self
[src]
pub fn price(self, price: u64) -> Self
[src]
Trait Implementations
impl Clone for OrderInfo
[src]
fn clone(&self) -> OrderInfo
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Default for OrderInfo
[src]
impl PartialEq<OrderInfo> for OrderInfo
[src]
impl Copy for OrderInfo
[src]
impl Eq for OrderInfo
[src]
impl Debug for OrderInfo
[src]
impl Serialize for OrderInfo
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for OrderInfo
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
Auto Trait Implementations
impl Sync for OrderInfo
impl Send for OrderInfo
impl Unpin for OrderInfo
impl RefUnwindSafe for OrderInfo
impl UnwindSafe for OrderInfo
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> Clear for T where
T: InitializableFromZeroed + ?Sized,
T: InitializableFromZeroed + ?Sized,
fn clear(&mut self)
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> InitializableFromZeroed for T where
T: Default,
T: Default,
unsafe fn initialize(place: *mut T)
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> Erased for T
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
U: TryFrom<T>,