pub struct SIP {Show 15 fields
pub sip_id: String,
pub trading_symbol: String,
pub fund: String,
pub status: SIPStatus,
pub created: DateTime<Utc>,
pub frequency: SIPFrequency,
pub installment_amount: f64,
pub completed_instalments: u32,
pub pending_instalments: Option<u32>,
pub next_instalment: Option<NaiveDate>,
pub last_instalment: Option<NaiveDate>,
pub trigger_price: Option<f64>,
pub tag: Option<String>,
pub dividend_type: String,
pub step_up: Option<SIPStepUp>,
}
Expand description
SIP (Systematic Investment Plan) data structure
Fields§
§sip_id: String
SIP ID
trading_symbol: String
Trading symbol
fund: String
Fund name
status: SIPStatus
SIP status
created: DateTime<Utc>
Created timestamp
frequency: SIPFrequency
Frequency (monthly, weekly, daily)
installment_amount: f64
Installment amount
completed_instalments: u32
Installments completed
pending_instalments: Option<u32>
Pending installments
next_instalment: Option<NaiveDate>
Next installment date
last_instalment: Option<NaiveDate>
Last installment date
trigger_price: Option<f64>
SIP trigger price (if any)
tag: Option<String>
Tag
dividend_type: String
Dividend type
step_up: Option<SIPStepUp>
Step up configuration (if any)
Implementations§
Source§impl SIP
impl SIP
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Check if SIP is cancelled
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if SIP is completed
Sourcepub fn total_invested(&self) -> f64
pub fn total_invested(&self) -> f64
Calculate total invested amount
Sourcepub fn is_perpetual(&self) -> bool
pub fn is_perpetual(&self) -> bool
Check if this is a perpetual SIP (no end date)
Sourcepub fn total_instalments(&self) -> Option<u32>
pub fn total_instalments(&self) -> Option<u32>
Get total installments (completed + pending)
Sourcepub fn progress_percentage(&self) -> Option<f64>
pub fn progress_percentage(&self) -> Option<f64>
Calculate progress percentage
Sourcepub fn remaining_amount(&self) -> Option<f64>
pub fn remaining_amount(&self) -> Option<f64>
Get remaining amount to be invested
Sourcepub fn has_step_up(&self) -> bool
pub fn has_step_up(&self) -> bool
Check if step-up is configured
Sourcepub fn monthly_equivalent_amount(&self) -> f64
pub fn monthly_equivalent_amount(&self) -> f64
Get monthly equivalent amount (for comparison across frequencies)
Sourcepub fn annual_amount(&self) -> f64
pub fn annual_amount(&self) -> f64
Get annual investment amount
Sourcepub fn is_due_soon(&self, days: i64) -> bool
pub fn is_due_soon(&self, days: i64) -> bool
Check if next installment is due soon (within days)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for SIP
impl<'de> Deserialize<'de> for SIP
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 SIP
impl RefUnwindSafe for SIP
impl Send for SIP
impl Sync for SIP
impl Unpin for SIP
impl UnwindSafe for SIP
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