#[repr(C)]pub struct PositionState {
pub trade_id: u64,
pub increased_at: i64,
pub updated_at_slot: u64,
pub decreased_at: i64,
pub size_in_tokens: u128,
pub collateral_amount: u128,
pub size_in_usd: u128,
pub borrowing_factor: u128,
pub funding_fee_amount_per_size: u128,
pub long_token_claimable_funding_amount_per_size: u128,
pub short_token_claimable_funding_amount_per_size: u128,
pub reserved: [u8; 128],
}Expand description
Position State.
Fields§
§trade_id: u64§increased_at: i64§updated_at_slot: u64§decreased_at: i64§size_in_tokens: u128§collateral_amount: u128§size_in_usd: u128§borrowing_factor: u128§funding_fee_amount_per_size: u128§long_token_claimable_funding_amount_per_size: u128§short_token_claimable_funding_amount_per_size: u128§reserved: [u8; 128]Trait Implementations§
Source§impl Clone for PositionState
impl Clone for PositionState
Source§fn clone(&self) -> PositionState
fn clone(&self) -> PositionState
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PositionState
impl Debug for PositionState
impl Copy for PositionState
impl Pod for PositionState
Auto Trait Implementations§
impl Freeze for PositionState
impl RefUnwindSafe for PositionState
impl Send for PositionState
impl Sync for PositionState
impl Unpin for PositionState
impl UnwindSafe for PositionState
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.