pub struct PositionStatus {
pub entry_price: u128,
pub collateral_value: u128,
pub pending_pnl: i128,
pub pending_borrowing_fee_value: u128,
pub pending_funding_fee_value: u128,
pub pending_claimable_funding_fee_value_in_long_token: u128,
pub pending_claimable_funding_fee_value_in_short_token: u128,
pub close_order_fee_value: u128,
pub net_value: i128,
pub leverage: Option<u128>,
pub liquidation_price: Option<u128>,
}Expand description
Position Status.
Fields§
§entry_price: u128Entry price.
collateral_value: u128Collateral value.
pending_pnl: i128Pending PnL.
pending_borrowing_fee_value: u128Pending borrowing fee value.
pending_funding_fee_value: u128Pending funding fee value.
pending_claimable_funding_fee_value_in_long_token: u128Pending claimable funding fee value in long token.
pending_claimable_funding_fee_value_in_short_token: u128Pending claimable funding fee value in short token.
close_order_fee_value: u128Close order fee value.
net_value: i128Net value.
leverage: Option<u128>Leverage.
liquidation_price: Option<u128>Liquidation price.
Trait Implementations§
Source§impl Clone for PositionStatus
impl Clone for PositionStatus
Source§fn clone(&self) -> PositionStatus
fn clone(&self) -> PositionStatus
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 PositionStatus
impl Debug for PositionStatus
Source§impl Default for PositionStatus
impl Default for PositionStatus
Source§fn default() -> PositionStatus
fn default() -> PositionStatus
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PositionStatus
impl<'de> Deserialize<'de> for PositionStatus
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
Source§impl From<PositionStatus> for JsValuewhere
PositionStatus: Serialize,
impl From<PositionStatus> for JsValuewhere
PositionStatus: Serialize,
Source§fn from(value: PositionStatus) -> Self
fn from(value: PositionStatus) -> Self
Converts to this type from the input type.
Source§impl FromWasmAbi for PositionStatuswhere
Self: DeserializeOwned,
impl FromWasmAbi for PositionStatuswhere
Self: DeserializeOwned,
Source§impl IntoWasmAbi for PositionStatuswhere
PositionStatus: Serialize,
impl IntoWasmAbi for PositionStatuswhere
PositionStatus: Serialize,
Source§impl OptionFromWasmAbi for PositionStatuswhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for PositionStatuswhere
Self: DeserializeOwned,
Source§impl OptionIntoWasmAbi for PositionStatuswhere
PositionStatus: Serialize,
impl OptionIntoWasmAbi for PositionStatuswhere
PositionStatus: Serialize,
Source§impl RefFromWasmAbi for PositionStatuswhere
Self: DeserializeOwned,
impl RefFromWasmAbi for PositionStatuswhere
Self: DeserializeOwned,
Source§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
The Wasm ABI type references to
Self are recovered from.Source§type Anchor = SelfOwner<PositionStatus>
type Anchor = SelfOwner<PositionStatus>
The type that holds the reference to
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl Serialize for PositionStatus
impl Serialize for PositionStatus
Source§impl Tsify for PositionStatus
impl Tsify for PositionStatus
const DECL: &'static str = "/**\n * Position Status.\n */\nexport interface PositionStatus {\n /**\n * Entry price.\n */\n entry_price: bigint;\n /**\n * Collateral value.\n */\n collateral_value: bigint;\n /**\n * Pending PnL.\n */\n pending_pnl: bigint;\n /**\n * Pending borrowing fee value.\n */\n pending_borrowing_fee_value: bigint;\n /**\n * Pending funding fee value.\n */\n pending_funding_fee_value: bigint;\n /**\n * Pending claimable funding fee value in long token.\n */\n pending_claimable_funding_fee_value_in_long_token: bigint;\n /**\n * Pending claimable funding fee value in short token.\n */\n pending_claimable_funding_fee_value_in_short_token: bigint;\n /**\n * Close order fee value.\n */\n close_order_fee_value: bigint;\n /**\n * Net value.\n */\n net_value: bigint;\n /**\n * Leverage.\n */\n leverage: bigint | undefined;\n /**\n * Liquidation price.\n */\n liquidation_price: bigint | undefined;\n}"
const SERIALIZATION_CONFIG: SerializationConfig
type JsType = JsType
fn into_js(&self) -> Result<Self::JsType, Error>where
Self: Serialize,
fn from_js<T>(js: T) -> Result<Self, Error>
Source§impl VectorFromWasmAbi for PositionStatuswhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for PositionStatuswhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl VectorIntoWasmAbi for PositionStatuswhere
PositionStatus: Serialize,
impl VectorIntoWasmAbi for PositionStatuswhere
PositionStatus: Serialize,
type Abi = <JsType as VectorIntoWasmAbi>::Abi
fn vector_into_abi(vector: Box<[Self]>) -> Self::Abi
Source§impl WasmDescribeVector for PositionStatus
impl WasmDescribeVector for PositionStatus
Auto Trait Implementations§
impl Freeze for PositionStatus
impl RefUnwindSafe for PositionStatus
impl Send for PositionStatus
impl Sync for PositionStatus
impl Unpin for PositionStatus
impl UnwindSafe for PositionStatus
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
impl<T> ReturnWasmAbi for Twhere
T: IntoWasmAbi,
Source§type Abi = <T as IntoWasmAbi>::Abi
type Abi = <T as IntoWasmAbi>::Abi
Same as
IntoWasmAbi::AbiSource§fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
fn return_abi(self) -> <T as ReturnWasmAbi>::Abi
Same as
IntoWasmAbi::into_abi, except that it may throw and never
return in the case of Err.