[][src]Struct finance_solution::NpvPeriod

pub struct NpvPeriod { /* fields omitted */ }

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]

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

impl Clone for NpvPeriod[src]

impl Debug for NpvPeriod[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.