pub struct CompoundInterestParams {
pub principal: f64,
pub annual_rate: f64,
pub compounds_per_year: u32,
pub years: f64,
}
Expand description
Represents the parameters for compound interest calculations
Fields§
§principal: f64
Initial principal amount
annual_rate: f64
Annual interest rate (as a decimal, e.g., 0.05 for 5%)
compounds_per_year: u32
Number of times interest is compounded per year
years: f64
Number of years
Trait Implementations§
Source§impl Clone for CompoundInterestParams
impl Clone for CompoundInterestParams
Source§fn clone(&self) -> CompoundInterestParams
fn clone(&self) -> CompoundInterestParams
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 moreAuto Trait Implementations§
impl Freeze for CompoundInterestParams
impl RefUnwindSafe for CompoundInterestParams
impl Send for CompoundInterestParams
impl Sync for CompoundInterestParams
impl Unpin for CompoundInterestParams
impl UnwindSafe for CompoundInterestParams
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