[−][src]Struct finance_solution::NpvPeriod
Implementations
impl NpvPeriod
[src]
pub fn new(
period: u32,
rate: f64,
present_value: f64,
future_value: f64,
investment_value: f64,
formula: String,
formula_symbolic: String
) -> Self
[src]
period: u32,
rate: f64,
present_value: f64,
future_value: f64,
investment_value: f64,
formula: String,
formula_symbolic: String
) -> Self
pub fn period(&self) -> u32
[src]
Returns the period number. The first real period is 1 but there's also a period 0 which which shows the starting conditions.
pub fn rate(&self) -> f64
[src]
Returns the periodic rate for the current period. If the containing struct is a
TvmSolution
every period will have the same rate. If it's a [TvmSchedule
] each period
may have a different rate.
pub fn present_value(&self) -> f64
[src]
Returns the present value of the cashflow.
pub fn future_value(&self) -> f64
[src]
Returns the future value of the cashflow.
pub fn investment_value(&self) -> f64
[src]
Returns the investment value of the Npv scenario at the time of the current period.
pub fn formula(&self) -> &str
[src]
Returns a text version of the formula used to calculate the value for the current period.
The formula includes the actual values rather than variable names. For the formula with
variables such as pv for present value call formula_symbolic
.
pub fn formula_symbolic(&self) -> &str
[src]
Returns a text version of the formula used to calculate the value for the current period.
The formula includes variables such as r for the rate. For the formula with actual values
rather than variables call formula
.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for NpvPeriod
impl Send for NpvPeriod
impl Sync for NpvPeriod
impl Unpin for NpvPeriod
impl UnwindSafe for NpvPeriod
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,