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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
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
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.