pub struct DebtInstrument {Show 14 fields
pub id: String,
pub entity_id: String,
pub instrument_type: DebtType,
pub lender: String,
pub principal: Decimal,
pub currency: String,
pub interest_rate: Decimal,
pub rate_type: InterestRateType,
pub origination_date: NaiveDate,
pub maturity_date: NaiveDate,
pub amortization_schedule: Vec<AmortizationPayment>,
pub covenants: Vec<DebtCovenant>,
pub drawn_amount: Decimal,
pub facility_limit: Decimal,
}Expand description
A debt instrument (loan, bond, credit facility).
Fields§
§id: StringUnique instrument identifier
entity_id: StringLegal entity borrower
instrument_type: DebtTypeType of debt instrument
lender: StringLender / creditor name
principal: DecimalOriginal principal amount
currency: StringDenomination currency
interest_rate: DecimalInterest rate (annual, as decimal fraction)
rate_type: InterestRateTypeFixed or variable rate
origination_date: NaiveDateDate the instrument was originated
maturity_date: NaiveDateContractual maturity date
amortization_schedule: Vec<AmortizationPayment>Amortization schedule (empty for bullet / revolving)
covenants: Vec<DebtCovenant>Associated financial covenants
drawn_amount: DecimalCurrent drawn amount (for revolving facilities)
facility_limit: DecimalCommitted facility limit (for revolving facilities)
Implementations§
Source§impl DebtInstrument
impl DebtInstrument
Sourcepub fn new(
id: impl Into<String>,
entity_id: impl Into<String>,
instrument_type: DebtType,
lender: impl Into<String>,
principal: Decimal,
currency: impl Into<String>,
interest_rate: Decimal,
rate_type: InterestRateType,
origination_date: NaiveDate,
maturity_date: NaiveDate,
) -> Self
pub fn new( id: impl Into<String>, entity_id: impl Into<String>, instrument_type: DebtType, lender: impl Into<String>, principal: Decimal, currency: impl Into<String>, interest_rate: Decimal, rate_type: InterestRateType, origination_date: NaiveDate, maturity_date: NaiveDate, ) -> Self
Creates a new debt instrument.
Sourcepub fn with_amortization_schedule(
self,
schedule: Vec<AmortizationPayment>,
) -> Self
pub fn with_amortization_schedule( self, schedule: Vec<AmortizationPayment>, ) -> Self
Sets the amortization schedule.
Sourcepub fn with_covenant(self, covenant: DebtCovenant) -> Self
pub fn with_covenant(self, covenant: DebtCovenant) -> Self
Adds a covenant.
Sourcepub fn with_drawn_amount(self, amount: Decimal) -> Self
pub fn with_drawn_amount(self, amount: Decimal) -> Self
Sets the drawn amount (for revolving facilities).
Sourcepub fn with_facility_limit(self, limit: Decimal) -> Self
pub fn with_facility_limit(self, limit: Decimal) -> Self
Sets the facility limit (for revolving facilities).
Sourcepub fn total_principal_payments(&self) -> Decimal
pub fn total_principal_payments(&self) -> Decimal
Returns the total principal payments across the amortization schedule.
Sourcepub fn total_interest_payments(&self) -> Decimal
pub fn total_interest_payments(&self) -> Decimal
Returns the total interest payments across the amortization schedule.
Sourcepub fn available_capacity(&self) -> Decimal
pub fn available_capacity(&self) -> Decimal
Returns available capacity on a revolving credit facility.
Sourcepub fn all_covenants_compliant(&self) -> bool
pub fn all_covenants_compliant(&self) -> bool
Returns true if all covenants are compliant.
Trait Implementations§
Source§impl Clone for DebtInstrument
impl Clone for DebtInstrument
Source§fn clone(&self) -> DebtInstrument
fn clone(&self) -> DebtInstrument
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DebtInstrument
impl Debug for DebtInstrument
Source§impl<'de> Deserialize<'de> for DebtInstrument
impl<'de> Deserialize<'de> for DebtInstrument
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>,
Source§impl Serialize for DebtInstrument
impl Serialize for DebtInstrument
Source§impl ToNodeProperties for DebtInstrument
impl ToNodeProperties for DebtInstrument
Source§fn node_type_name(&self) -> &'static str
fn node_type_name(&self) -> &'static str
"uncertain_tax_position".Source§fn node_type_code(&self) -> u16
fn node_type_code(&self) -> u16
416.Source§fn to_node_properties(&self) -> HashMap<String, GraphPropertyValue>
fn to_node_properties(&self) -> HashMap<String, GraphPropertyValue>
Auto Trait Implementations§
impl Freeze for DebtInstrument
impl RefUnwindSafe for DebtInstrument
impl Send for DebtInstrument
impl Sync for DebtInstrument
impl Unpin for DebtInstrument
impl UnsafeUnpin for DebtInstrument
impl UnwindSafe for DebtInstrument
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.