pub struct DebtCovenant {Show 15 fields
pub id: String,
pub covenant_type: CovenantType,
pub threshold: Decimal,
pub measurement_frequency: Frequency,
pub actual_value: Decimal,
pub measurement_date: NaiveDate,
pub is_compliant: bool,
pub headroom: Decimal,
pub waiver_obtained: bool,
pub facility_id: Option<String>,
pub entity_code: Option<String>,
pub facility_name: Option<String>,
pub outstanding_principal: Option<Decimal>,
pub currency: Option<String>,
pub period: Option<String>,
}Expand description
A financial covenant attached to a debt instrument.
Fields§
§id: StringUnique covenant identifier
covenant_type: CovenantTypeType of financial ratio being tested
threshold: DecimalCovenant threshold value
measurement_frequency: FrequencyHow often the covenant is tested
actual_value: DecimalMost recent actual measured value
measurement_date: NaiveDateDate the measurement was taken
is_compliant: boolWhether the entity is in compliance
headroom: DecimalDistance from the covenant threshold (positive = headroom, negative = breach)
waiver_obtained: boolWhether a waiver was obtained for a breach
facility_id: Option<String>Back-reference to the parent debt instrument ID
entity_code: Option<String>Entity / company code
facility_name: Option<String>Debt facility name
outstanding_principal: Option<Decimal>Outstanding principal at measurement date
currency: Option<String>Currency of the facility
period: Option<String>Fiscal period (e.g. “2024-06”)
Implementations§
Source§impl DebtCovenant
impl DebtCovenant
Sourcepub fn new(
id: impl Into<String>,
covenant_type: CovenantType,
threshold: Decimal,
measurement_frequency: Frequency,
actual_value: Decimal,
measurement_date: NaiveDate,
) -> Self
pub fn new( id: impl Into<String>, covenant_type: CovenantType, threshold: Decimal, measurement_frequency: Frequency, actual_value: Decimal, measurement_date: NaiveDate, ) -> Self
Creates a new debt covenant.
Sourcepub fn with_waiver(self, waiver: bool) -> Self
pub fn with_waiver(self, waiver: bool) -> Self
Sets the waiver flag.
Sourcepub fn with_facility(
self,
facility_id: impl Into<String>,
entity_code: impl Into<String>,
facility_name: impl Into<String>,
outstanding_principal: Decimal,
currency: impl Into<String>,
period: impl Into<String>,
) -> Self
pub fn with_facility( self, facility_id: impl Into<String>, entity_code: impl Into<String>, facility_name: impl Into<String>, outstanding_principal: Decimal, currency: impl Into<String>, period: impl Into<String>, ) -> Self
Set the parent debt facility details for standalone graph export.
Sourcepub fn update_compliance(&mut self)
pub fn update_compliance(&mut self)
Recomputes compliance and headroom from current values.
Trait Implementations§
Source§impl Clone for DebtCovenant
impl Clone for DebtCovenant
Source§fn clone(&self) -> DebtCovenant
fn clone(&self) -> DebtCovenant
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 Debug for DebtCovenant
impl Debug for DebtCovenant
Source§impl<'de> Deserialize<'de> for DebtCovenant
impl<'de> Deserialize<'de> for DebtCovenant
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 Serialize for DebtCovenant
impl Serialize for DebtCovenant
Source§impl ToNodeProperties for DebtCovenant
impl ToNodeProperties for DebtCovenant
Source§fn node_type_name(&self) -> &'static str
fn node_type_name(&self) -> &'static str
Entity type name (snake_case), e.g.
"uncertain_tax_position".Source§fn node_type_code(&self) -> u16
fn node_type_code(&self) -> u16
Numeric entity type code for registry, e.g.
416.Source§fn to_node_properties(&self) -> HashMap<String, GraphPropertyValue>
fn to_node_properties(&self) -> HashMap<String, GraphPropertyValue>
Convert all fields to a property map with camelCase keys.
Auto Trait Implementations§
impl Freeze for DebtCovenant
impl RefUnwindSafe for DebtCovenant
impl Send for DebtCovenant
impl Sync for DebtCovenant
impl Unpin for DebtCovenant
impl UnsafeUnpin for DebtCovenant
impl UnwindSafe for DebtCovenant
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