pub struct CreditRatingDistribution {
pub aaa: f64,
pub aa: f64,
pub a: f64,
pub bbb: f64,
pub bb: f64,
pub b: f64,
pub below_b: f64,
pub excellent: f64,
pub good: f64,
pub fair: f64,
pub poor: f64,
}Expand description
Credit rating distribution for customers.
Two parallel vocabularies are accepted:
- Bond-grade tiers:
aaa,aa,a,bbb,bb,b,below_b - Plain-English tiers:
excellent,good,fair,poor
All fields default to 0.0 if absent; mix and match as needed.
The validator enforces that the populated weights sum to 1.0.
Fields§
§aaa: f64AAA rating
aa: f64AA rating
a: f64A rating
bbb: f64BBB rating
bb: f64BB rating
b: f64B rating
below_b: f64Below B rating
excellent: f64Plain-English: excellent credit (≈ AAA/AA tier)
good: f64Plain-English: good credit (≈ A tier)
fair: f64Plain-English: fair credit (≈ BBB/BB tier)
poor: f64Plain-English: poor credit (≈ B/below tier)
Trait Implementations§
Source§impl Clone for CreditRatingDistribution
impl Clone for CreditRatingDistribution
Source§fn clone(&self) -> CreditRatingDistribution
fn clone(&self) -> CreditRatingDistribution
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CreditRatingDistribution
impl Debug for CreditRatingDistribution
Source§impl Default for CreditRatingDistribution
impl Default for CreditRatingDistribution
Source§impl<'de> Deserialize<'de> for CreditRatingDistribution
impl<'de> Deserialize<'de> for CreditRatingDistribution
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
Auto Trait Implementations§
impl Freeze for CreditRatingDistribution
impl RefUnwindSafe for CreditRatingDistribution
impl Send for CreditRatingDistribution
impl Sync for CreditRatingDistribution
impl Unpin for CreditRatingDistribution
impl UnsafeUnpin for CreditRatingDistribution
impl UnwindSafe for CreditRatingDistribution
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