pub struct SpotPosition {
pub scaled_balance: u64,
pub market_index: u16,
pub balance_type: SpotBalanceType,
pub open_orders: u8,
pub open_bids: i64,
pub open_asks: i64,
pub cumulative_deposits: i64,
}Expand description
A single spot position within a Drift user account.
Fields§
§scaled_balance: u64§market_index: u16§balance_type: SpotBalanceType§open_orders: u8§open_bids: i64§open_asks: i64§cumulative_deposits: i64Trait Implementations§
Source§impl Clone for SpotPosition
impl Clone for SpotPosition
Source§fn clone(&self) -> SpotPosition
fn clone(&self) -> SpotPosition
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 SpotPosition
impl Debug for SpotPosition
Source§impl Default for SpotPosition
impl Default for SpotPosition
Source§fn default() -> SpotPosition
fn default() -> SpotPosition
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SpotPosition
impl<'de> Deserialize<'de> for SpotPosition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SpotPosition
impl RefUnwindSafe for SpotPosition
impl Send for SpotPosition
impl Sync for SpotPosition
impl Unpin for SpotPosition
impl UnsafeUnpin for SpotPosition
impl UnwindSafe for SpotPosition
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