Struct amfnengine::core::list_statistic_helper::ListStatisticHelper [−]
Implementations
impl ListStatisticHelper
List of statistic helper elements implementation.
pub fn new() -> ListStatisticHelper
pub fn add_statistic_helper(
&mut self,
name_param: &str,
last_date_param: usize,
elem_am_index_param: usize
) -> bool
&mut self,
name_param: &str,
last_date_param: usize,
elem_am_index_param: usize
) -> bool
Add a new statistic into the statistics list.
Arguments
name_param
- Name of the statistic.last_date_param
- The last statistic event date.elem_am_index_param
- Index of the amortization element.
Return
- True if successful, otherwise false.
pub fn copy(&self) -> ListStatisticHelper
Performs a deep copy of this statistic helper list and returns a new statistic helper.
Return
- See description.
pub fn name(&self) -> &str
pub fn principal_decrease(&self) -> Decimal
pub fn principal_increase(&self) -> Decimal
pub fn interest(&self) -> Decimal
pub fn sl_interest(&self) -> Decimal
pub fn value_to_interest(&self) -> Decimal
pub fn value_to_principal(&self) -> Decimal
pub fn last_date(&self) -> usize
pub fn elem_am_index(&self) -> usize
pub fn get_element_by_name(&self, name_param: &str) -> bool
Select a statistic based upon a name.
Arguments
name_param
- The name of the statistic to select.
Return
- True if successful, otherwise false.
pub fn incr_principal_decrease(
&mut self,
principal_decrease_param: Decimal
) -> bool
&mut self,
principal_decrease_param: Decimal
) -> bool
Increment the accumulated principal decrease for statistics period.
Arguments
principal_decrease_param
- See description.
Return
- True if successful, otherwise false.
pub fn incr_principal_increase(
&mut self,
principal_increase_param: Decimal
) -> bool
&mut self,
principal_increase_param: Decimal
) -> bool
Increment the accumulated principal increase for statistics period.
Arguments
principal_increase_param
- See description.
Return
- True if successful, otherwise false.
pub fn incr_interest(&mut self, interest_param: Decimal) -> bool
Increment the accumulated compounded interest for period.
Arguments
interest_param
- See description.
Return
- True if successful, otherwise false.
pub fn incr_sl_interest(&mut self, sl_interest_param: Decimal) -> bool
Increment the accumulated straight-line interest for period.
Arguments
sl_interest_param
- See description.
Return
- True if successful, otherwise false.
pub fn incr_value_to_interest(
&mut self,
value_to_interest_param: Decimal
) -> bool
&mut self,
value_to_interest_param: Decimal
) -> bool
Increment the accumulated value to interest for period.
Arguments
value_to_interest_param
- See description.
Return
- True if successful, otherwise false.
pub fn incr_value_to_principal(
&mut self,
value_to_principal_param: Decimal
) -> bool
&mut self,
value_to_principal_param: Decimal
) -> bool
Increment the accumulated value to principal for period.
Arguments
value_to_principal_param
- See description.
Return
- True if successful, otherwise false.
pub fn remove(&mut self) -> bool
pub fn reset(&mut self) -> bool
pub fn set_last_date(&mut self, last_date_param: usize) -> bool
Set the last statistic event date.
Arguments
last_date_param
- See description.
Return
- True if successful, otherwise false.
pub fn set_elem_am_index(&mut self, elem_am_index_param: usize) -> bool
Trait Implementations
impl Default for ListStatisticHelper
List of statistic helper elements default implementation.
impl ListTrait for ListStatisticHelper
List of statistic helper list implementation.
fn clear(&mut self)
Clear all statistics from the statistic list.
fn count(&self) -> usize
fn index(&self) -> usize
fn get_element(&self, index_param: usize) -> bool
Select a statistic based upon an index value.
Arguments
index_param
- Index value of the statistic to select (starting from 0).
Return
- True if successful, otherwise false.
fn set_index(&self, index_param: usize) -> bool
Auto Trait Implementations
impl !RefUnwindSafe for ListStatisticHelper
impl Send for ListStatisticHelper
impl !Sync for ListStatisticHelper
impl Unpin for ListStatisticHelper
impl UnwindSafe for ListStatisticHelper
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,
pub 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, 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.
pub 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>,