pub enum TvmVariable {
Rate,
Periods,
PresentValue,
FutureValue,
}
Expand description
Enumeration used for the calculated_field
field in TvmSolution
and [TvmSchedule
] to keep
track of what was calculated, either the periodic rate, the number of periods, the present
value, or the future value.
Variants§
Implementations§
Source§impl TvmVariable
impl TvmVariable
Sourcepub fn is_rate(&self) -> bool
pub fn is_rate(&self) -> bool
Returns true if the variant is TvmVariable::Rate indicating that the periodic rate was calculated from the number of periods, the present value, and the future value.
Sourcepub fn is_periods(&self) -> bool
pub fn is_periods(&self) -> bool
Returns true if the variant is TvmVariable::Periods indicating that the number of periods was calculated from the periocic rate, the present value, and the future value.
Sourcepub fn is_present_value(&self) -> bool
pub fn is_present_value(&self) -> bool
Returns true if the variant is TvmVariable::PresentValue indicating that the present value was calculated from one or more periocic rates, the number of periods, and the future value.
Sourcepub fn is_future_value(&self) -> bool
pub fn is_future_value(&self) -> bool
Returns true if the variant is TvmVariable::FutureValue indicating that the future value was calculated from one or more periocic rates, the number of periods, and the present value.
Trait Implementations§
Source§impl Clone for TvmVariable
impl Clone for TvmVariable
Source§fn clone(&self) -> TvmVariable
fn clone(&self) -> TvmVariable
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more