#[non_exhaustive]pub enum TradePL {
Positive,
Negative,
Zero,
Unknown(String),
}Expand description
The classification of TradePLs.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Positive
An open Trade currently has a positive (profitable) unrealized P/L, or a closed Trade realized a positive amount of P/L.
Negative
An open Trade currently has a negative (losing) unrealized P/L, or a closed Trade realized a negative amount of P/L.
Zero
An open Trade currently has unrealized P/L of zero (neither profitable nor losing), or a closed Trade realized a P/L amount of zero.
Unknown(String)
An unrecognized provider value, preserved for forward compatibility.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TradePL
impl<'de> Deserialize<'de> for TradePL
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TradePL
impl StructuralPartialEq for TradePL
Auto Trait Implementations§
impl Freeze for TradePL
impl RefUnwindSafe for TradePL
impl Send for TradePL
impl Sync for TradePL
impl Unpin for TradePL
impl UnsafeUnpin for TradePL
impl UnwindSafe for TradePL
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