pub struct FutureValue { /* private fields */ }Expand description
§Compute the future value
§Parameters
rate: an interest rate compounded once per periodnper: number of compounding periodspmt: payment in each periodpv: present valuewhen: when payments are dueWhenType. Defaults toWhen::End
§Return:
fv: the value at the end of thenperperiods, which is used in other modules as parameter
§Example
use rfinancial::*;
let fv = FutureValue::from_tuple((0.075, 20, -2000.0, 0.0, WhenType::End));
println!("{:#?}'s fv is {:?}", fv, fv.get());Implementations§
Source§impl FutureValue
impl FutureValue
Sourcepub fn from_tuple(tup: (f64, u32, f64, f64, WhenType)) -> Self
pub fn from_tuple(tup: (f64, u32, f64, f64, WhenType)) -> Self
Instantiate a FutureValue instance from a tuple of (rate, nper, pmt, pv and when) in said order
Trait Implementations§
Auto Trait Implementations§
impl Freeze for FutureValue
impl RefUnwindSafe for FutureValue
impl Send for FutureValue
impl Sync for FutureValue
impl Unpin for FutureValue
impl UnwindSafe for FutureValue
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