pub struct ConvertRateSolution { /* private fields */ }
Implementations§
Source§impl ConvertRateSolution
impl ConvertRateSolution
pub fn new( input_name: ConvertRateVariable, input_rate: f64, compounds_per_year: u32, apr_in_percent: String, epr_in_percent: String, ear_in_percent: String, apr: f64, epr: f64, ear: f64, apr_formula: &str, epr_formula: &str, ear_formula: &str, ) -> Self
Sourcepub fn input_rate(&self) -> f64
pub fn input_rate(&self) -> f64
Returns the input rate.
Sourcepub fn input_name(&self) -> &ConvertRateVariable
pub fn input_name(&self) -> &ConvertRateVariable
Returns the input name (Ear, Apr, Epr, AprContinuous…etc).
Sourcepub fn compounds_per_year(&self) -> u32
pub fn compounds_per_year(&self) -> u32
Returns the compounds per year as u32.
Sourcepub fn apr_in_percent(&self) -> &String
pub fn apr_in_percent(&self) -> &String
Returns the annual rate (APR) in percentage format (for example, 3.58%).
Sourcepub fn ear_in_percent(&self) -> &String
pub fn ear_in_percent(&self) -> &String
Returns the effective annual rate (EAR) in percentage format (for example, 3.69%).
Sourcepub fn epr_in_percent(&self) -> &String
pub fn epr_in_percent(&self) -> &String
Returns the periodic rate (EPR) in percentage format (for example, 1.12%).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConvertRateSolution
impl RefUnwindSafe for ConvertRateSolution
impl Send for ConvertRateSolution
impl Sync for ConvertRateSolution
impl Unpin for ConvertRateSolution
impl UnwindSafe for ConvertRateSolution
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