pub enum CustomerPaymentBehavior {
Excellent,
EarlyPayer,
Good,
OnTime,
Fair,
SlightlyLate,
Poor,
OftenLate,
VeryPoor,
HighRisk,
}Expand description
Customer payment behavior for simulation.
Variants§
Excellent
Excellent - always pays early or on time
EarlyPayer
Early payer (alias for Excellent)
Good
Good - usually pays on time
OnTime
On time payer (alias for Good)
Fair
Fair - sometimes late
SlightlyLate
Slightly late (alias for Fair)
Poor
Poor - frequently late
OftenLate
Often late (alias for Poor)
VeryPoor
Very Poor - chronically delinquent
HighRisk
High risk (alias for VeryPoor)
Implementations§
Source§impl CustomerPaymentBehavior
impl CustomerPaymentBehavior
Sourcepub fn average_days_past_due(&self) -> i16
pub fn average_days_past_due(&self) -> i16
Get average days past due for this behavior.
Sourcepub fn on_time_probability(&self) -> f64
pub fn on_time_probability(&self) -> f64
Get probability of payment on time.
Sourcepub fn discount_probability(&self) -> f64
pub fn discount_probability(&self) -> f64
Get probability of taking early payment discount.
Trait Implementations§
Source§impl Clone for CustomerPaymentBehavior
impl Clone for CustomerPaymentBehavior
Source§fn clone(&self) -> CustomerPaymentBehavior
fn clone(&self) -> CustomerPaymentBehavior
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 CustomerPaymentBehavior
impl Debug for CustomerPaymentBehavior
Source§impl Default for CustomerPaymentBehavior
impl Default for CustomerPaymentBehavior
Source§fn default() -> CustomerPaymentBehavior
fn default() -> CustomerPaymentBehavior
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CustomerPaymentBehavior
impl<'de> Deserialize<'de> for CustomerPaymentBehavior
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 Hash for CustomerPaymentBehavior
impl Hash for CustomerPaymentBehavior
Source§impl PartialEq for CustomerPaymentBehavior
impl PartialEq for CustomerPaymentBehavior
Source§impl Serialize for CustomerPaymentBehavior
impl Serialize for CustomerPaymentBehavior
impl Copy for CustomerPaymentBehavior
impl Eq for CustomerPaymentBehavior
impl StructuralPartialEq for CustomerPaymentBehavior
Auto Trait Implementations§
impl Freeze for CustomerPaymentBehavior
impl RefUnwindSafe for CustomerPaymentBehavior
impl Send for CustomerPaymentBehavior
impl Sync for CustomerPaymentBehavior
impl Unpin for CustomerPaymentBehavior
impl UnwindSafe for CustomerPaymentBehavior
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.