Struct amfnengine::engine::list_cashflow::ListCashflow
[−]pub struct ListCashflow { /* private fields */ }
Implementations
impl ListCashflow
impl ListCashflow
List of currently active cashflows implementation.
pub fn new(calc_manager_param: &Rc<RefCell<CalcManager>>) -> ListCashflow
pub fn new(calc_manager_param: &Rc<RefCell<CalcManager>>) -> ListCashflow
pub fn add_cashflow_prep(
&self,
name_param: &str,
list_event_param: Option<ListEvent>,
elem_preferences_param: Option<ElemPreferences>,
group_param: &str
) -> Result<ElemCashflow, ErrorType>
pub fn add_cashflow_prep(
&self,
name_param: &str,
list_event_param: Option<ListEvent>,
elem_preferences_param: Option<ElemPreferences>,
group_param: &str
) -> Result<ElemCashflow, ErrorType>
Prepare to add a new cashflow into the cashflow list. If the name results in a duplicate entry, an incrementing number starting from 2 is appended to the name until a non-duplicate entry is found.
Arguments
name_param
- The name of the cashflow.list_event_param
- A newly created event list.elem_preferences_param
- Original existing preferences element (or None to initialize all preferences).group_param
- Optional template group name.
Return
- ElemCashflow if successful, otherwise error code.
pub fn add_cashflow(&mut self, elem_cashflow: ElemCashflow)
pub fn add_cashflow(&mut self, elem_cashflow: ElemCashflow)
pub fn append_cashflows(&mut self, list_cashflow: ListCashflow)
pub fn append_cashflows(&mut self, list_cashflow: ListCashflow)
pub fn copy_with_calc_manager(
&self,
calc_manager_param: &Rc<RefCell<CalcManager>>
) -> ListCashflow
pub fn copy_with_calc_manager(
&self,
calc_manager_param: &Rc<RefCell<CalcManager>>
) -> ListCashflow
pub fn create_cashflow_stats(&self) -> ElemCashflowStats
pub fn create_cashflow_stats(&self) -> ElemCashflowStats
pub fn create_cashflow_output(
&self,
include_rollups: bool,
include_details: bool,
compress_descriptor: bool,
omit_statistic_events: bool,
updating_json: bool
) -> Result<ListAmortization, ErrorType>
pub fn create_cashflow_output(
&self,
include_rollups: bool,
include_details: bool,
compress_descriptor: bool,
omit_statistic_events: bool,
updating_json: bool
) -> Result<ListAmortization, ErrorType>
Create a cashflow for output from the currently selected cashflow. Create the cashflow by combining principal change events that are identical except their dates but maintain a periodic flow according to the original frequencies.
Arguments
include_rollups
- Include rollup elements.include_details
- Include detail elements.compress_descriptor
- If true merge ListDescriptor objects into a single ListDescriptor object where applicable, otherwise do not compress amortization elements that have different ListDescriptor objects.omit_statistic_events
- If true the statistic events are eliminated from the resulting event list.updating_json
- Updating from Json.
Return
- The resulting amortization list or an error code.
pub fn preferences(&self) -> Option<&ElemPreferences>
pub fn preferences(&self) -> Option<&ElemPreferences>
pub fn preferences_mut(&mut self) -> Option<&mut ElemPreferences>
pub fn preferences_mut(&mut self) -> Option<&mut ElemPreferences>
pub fn list_event(&self) -> Option<&ListEvent>
pub fn list_event(&self) -> Option<&ListEvent>
pub fn list_event_mut(&mut self) -> Option<&mut ListEvent>
pub fn list_event_mut(&mut self) -> Option<&mut ListEvent>
pub fn list_amortization(&self) -> Option<&ListAmortization>
pub fn list_amortization(&self) -> Option<&ListAmortization>
pub fn calculate(&self) -> &CalcCalculate
pub fn calculate(&self) -> &CalcCalculate
pub fn list_statistic_helper(&self) -> Option<&ListStatisticHelper>
pub fn list_statistic_helper(&self) -> Option<&ListStatisticHelper>
pub fn elem_balance_result(&self) -> Option<&ElemBalanceResult>
pub fn elem_balance_result(&self) -> Option<&ElemBalanceResult>
pub fn last_amortization_index(&self) -> usize
pub fn last_amortization_index(&self) -> usize
pub fn cashflow_valid(&self) -> bool
pub fn cashflow_valid(&self) -> bool
pub fn get_element_name(&self, index_param: usize) -> &str
pub fn get_element_name(&self, index_param: usize) -> &str
pub fn get_element_by_name(
&self,
name_param: &str,
is_select_param: bool
) -> bool
pub fn get_element_by_name(
&self,
name_param: &str,
is_select_param: bool
) -> bool
pub fn reset_updated(&mut self)
pub fn reset_updated(&mut self)
Reset the updated value.
pub fn set_cashflow_valid(&mut self, valid_param: bool) -> bool
pub fn set_cashflow_valid(&mut self, valid_param: bool) -> bool
pub fn set_list_event(&mut self, list_event_param: ListEvent) -> bool
pub fn set_list_event(&mut self, list_event_param: ListEvent) -> bool
pub fn set_list_amortization(&mut self, list_am_param: ListAmortization) -> bool
pub fn set_list_amortization(&mut self, list_am_param: ListAmortization) -> bool
pub fn set_statistic_helper(
&mut self,
statistic_helper_param: ListStatisticHelper
) -> bool
pub fn set_statistic_helper(
&mut self,
statistic_helper_param: ListStatisticHelper
) -> bool
pub fn set_elem_balance_result(
&mut self,
elem_balance_result_param: ElemBalanceResult
) -> bool
pub fn set_elem_balance_result(
&mut self,
elem_balance_result_param: ElemBalanceResult
) -> bool
pub fn set_last_amortization_index(
&mut self,
last_am_index_param: usize
) -> bool
pub fn set_last_amortization_index(
&mut self,
last_am_index_param: usize
) -> bool
pub fn set_updated_value(&mut self, updated_param: bool) -> bool
pub fn set_updated_value(&mut self, updated_param: bool) -> bool
pub fn update_preferences(&self) -> bool
pub fn update_preferences(&self) -> bool
Update the “calculate-relative” cashflow preferences for the currently selected cashflow. Called after cash flow preferences are updated.
pub fn sort(&mut self)
pub fn sort(&mut self)
Sort the event list.
Trait Implementations
impl ListTrait for ListCashflow
impl ListTrait for ListCashflow
List of currently active cashflows list implementation.
Auto Trait Implementations
impl !RefUnwindSafe for ListCashflow
impl !Send for ListCashflow
impl !Sync for ListCashflow
impl Unpin for ListCashflow
impl !UnwindSafe for ListCashflow
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more