pub struct ProfitAnalysisItem {Show 15 fields
pub name: String,
pub market: String,
pub is_holding: bool,
pub profit: Option<Decimal>,
pub profit_rate: Option<Decimal>,
pub clearance_times: i64,
pub item_type: AssetType,
pub currency: String,
pub symbol: String,
pub holding_period: String,
pub security_code: String,
pub isin: String,
pub underlying_profit: Option<Decimal>,
pub derivatives_profit: Option<Decimal>,
pub order_profit: Option<Decimal>,
}Expand description
P&L for one security
Fields§
§name: StringSecurity name
market: StringMarket
is_holding: boolWhether still holding
profit: Option<Decimal>Profit/loss amount
profit_rate: Option<Decimal>Profit/loss rate
clearance_times: i64Number of completed trades
item_type: AssetTypeAsset type
currency: StringCurrency
symbol: StringSecurity symbol
holding_period: StringHolding period display string
security_code: StringTicker code
isin: StringISIN (for funds)
underlying_profit: Option<Decimal>Underlying stock P&L
derivatives_profit: Option<Decimal>Derivatives P&L
order_profit: Option<Decimal>P&L in order currency
Trait Implementations§
Source§impl Clone for ProfitAnalysisItem
impl Clone for ProfitAnalysisItem
Source§fn clone(&self) -> ProfitAnalysisItem
fn clone(&self) -> ProfitAnalysisItem
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 ProfitAnalysisItem
impl Debug for ProfitAnalysisItem
Source§impl<'de> Deserialize<'de> for ProfitAnalysisItem
impl<'de> Deserialize<'de> for ProfitAnalysisItem
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 ProfitAnalysisItem
impl RefUnwindSafe for ProfitAnalysisItem
impl Send for ProfitAnalysisItem
impl Sync for ProfitAnalysisItem
impl Unpin for ProfitAnalysisItem
impl UnsafeUnpin for ProfitAnalysisItem
impl UnwindSafe for ProfitAnalysisItem
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more