pub struct AmortizationPeriod<T> {
pub period: u32,
pub principal_payment: T,
pub interest_payment: T,
pub remaining_balance: T,
}
Expand description
Amorization Period
Represents a single period in an amortization schedule.
An amortization period includes information about the payment period, the portion of the payment allocated to principal, the portion allocated to interest, and the remaining balance of the loan or mortgage.
Fields§
§period: u32
The period number of the amortization schedule.
principal_payment: T
The amount of the payment allocated to reduce the principal balance.
interest_payment: T
The amount of the payment allocated to pay interest charges.
remaining_balance: T
The remaining balance of the loan or mortgage after the payment.
Implementations§
Source§impl<T: FloatLike> AmortizationPeriod<T>
impl<T: FloatLike> AmortizationPeriod<T>
Sourcepub fn new(
period: u32,
principal_payment: T,
interest_payment: T,
remaining_balance: T,
) -> Self
pub fn new( period: u32, principal_payment: T, interest_payment: T, remaining_balance: T, ) -> Self
Creates a new AmortizationPeriod
instance.
§Arguments
period
: The period number of the amortization schedule.principal_payment
: The amount allocated to reduce the principal balance.interest_payment
: The amount allocated to pay interest charges.remaining_balance
: The remaining balance of the loan or mortgage after the payment.
§Returns
A new AmortizationPeriod
instance initialized with the provided values.
§Examples
use rust_finprim::amort_dep_tax::AmortizationPeriod;
let period = AmortizationPeriod::new(1, 100.0, 50.0, 850.0);
Trait Implementations§
Source§impl<T: Clone> Clone for AmortizationPeriod<T>
impl<T: Clone> Clone for AmortizationPeriod<T>
Source§fn clone(&self) -> AmortizationPeriod<T>
fn clone(&self) -> AmortizationPeriod<T>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<T: Debug> Debug for AmortizationPeriod<T>
impl<T: Debug> Debug for AmortizationPeriod<T>
Source§impl<T: Default> Default for AmortizationPeriod<T>
impl<T: Default> Default for AmortizationPeriod<T>
Source§fn default() -> AmortizationPeriod<T>
fn default() -> AmortizationPeriod<T>
Returns the “default value” for a type. Read more
Source§impl<'de, T> Deserialize<'de> for AmortizationPeriod<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for AmortizationPeriod<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T: PartialEq> PartialEq for AmortizationPeriod<T>
impl<T: PartialEq> PartialEq for AmortizationPeriod<T>
Source§impl<T> Serialize for AmortizationPeriod<T>where
T: Serialize,
impl<T> Serialize for AmortizationPeriod<T>where
T: Serialize,
impl<T: Copy> Copy for AmortizationPeriod<T>
impl<T: Eq> Eq for AmortizationPeriod<T>
impl<T> StructuralPartialEq for AmortizationPeriod<T>
Auto Trait Implementations§
impl<T> Freeze for AmortizationPeriod<T>where
T: Freeze,
impl<T> RefUnwindSafe for AmortizationPeriod<T>where
T: RefUnwindSafe,
impl<T> Send for AmortizationPeriod<T>where
T: Send,
impl<T> Sync for AmortizationPeriod<T>where
T: Sync,
impl<T> Unpin for AmortizationPeriod<T>where
T: Unpin,
impl<T> UnwindSafe for AmortizationPeriod<T>where
T: UnwindSafe,
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