pub struct ProfitDetails {
pub holding_value: Option<Decimal>,
pub profit: Option<Decimal>,
pub cumulative_credited_amount: Option<Decimal>,
pub credited_details: Vec<ProfitDetailEntry>,
pub cumulative_debited_amount: Option<Decimal>,
pub debited_details: Vec<ProfitDetailEntry>,
pub cumulative_fee_amount: Option<Decimal>,
pub fee_details: Vec<ProfitDetailEntry>,
pub short_holding_value: Option<Decimal>,
pub long_holding_value: Option<Decimal>,
pub holding_value_at_beginning: Option<Decimal>,
pub holding_value_at_ending: Option<Decimal>,
}Expand description
Detailed P&L breakdown for one asset class
Fields§
§holding_value: Option<Decimal>Current holding market value
profit: Option<Decimal>Total profit/loss
cumulative_credited_amount: Option<Decimal>Cumulative credited amount
credited_details: Vec<ProfitDetailEntry>Credit detail entries
cumulative_debited_amount: Option<Decimal>Cumulative debited amount
debited_details: Vec<ProfitDetailEntry>Debit detail entries
cumulative_fee_amount: Option<Decimal>Cumulative fee amount
fee_details: Vec<ProfitDetailEntry>Fee detail entries
short_holding_value: Option<Decimal>Short position holding value
long_holding_value: Option<Decimal>Long position holding value
holding_value_at_beginning: Option<Decimal>Opening position market value at period start
holding_value_at_ending: Option<Decimal>Closing position market value at period end
Trait Implementations§
Source§impl Clone for ProfitDetails
impl Clone for ProfitDetails
Source§fn clone(&self) -> ProfitDetails
fn clone(&self) -> ProfitDetails
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 ProfitDetails
impl Debug for ProfitDetails
Source§impl<'de> Deserialize<'de> for ProfitDetails
impl<'de> Deserialize<'de> for ProfitDetails
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 ProfitDetails
impl RefUnwindSafe for ProfitDetails
impl Send for ProfitDetails
impl Sync for ProfitDetails
impl Unpin for ProfitDetails
impl UnsafeUnpin for ProfitDetails
impl UnwindSafe for ProfitDetails
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