pub struct BenefitScore(/* private fields */);Expand description
Normalized gain or business-value score in basis points.
Implementations§
Source§impl BenefitScore
impl BenefitScore
Sourcepub fn from_basis_points(value: u16) -> Result<Self, PlannerError>
pub fn from_basis_points(value: u16) -> Result<Self, PlannerError>
Creates a benefit score from basis points.
Sourcepub fn from_percent(value: u8) -> Result<Self, PlannerError>
pub fn from_percent(value: u8) -> Result<Self, PlannerError>
Creates a benefit score from an integer percentage.
Sourcepub const fn basis_points(self) -> u16
pub const fn basis_points(self) -> u16
Returns the normalized score in basis points.
Trait Implementations§
Source§impl Clone for BenefitScore
impl Clone for BenefitScore
Source§fn clone(&self) -> BenefitScore
fn clone(&self) -> BenefitScore
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 moreimpl Copy for BenefitScore
Source§impl Debug for BenefitScore
impl Debug for BenefitScore
Source§impl<'de> Deserialize<'de> for BenefitScore
impl<'de> Deserialize<'de> for BenefitScore
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
impl Eq for BenefitScore
Source§impl Hash for BenefitScore
impl Hash for BenefitScore
Source§impl Ord for BenefitScore
impl Ord for BenefitScore
Source§fn cmp(&self, other: &BenefitScore) -> Ordering
fn cmp(&self, other: &BenefitScore) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for BenefitScore
impl PartialEq for BenefitScore
Source§impl PartialOrd for BenefitScore
impl PartialOrd for BenefitScore
Source§impl Serialize for BenefitScore
impl Serialize for BenefitScore
impl StructuralPartialEq for BenefitScore
Auto Trait Implementations§
impl Freeze for BenefitScore
impl RefUnwindSafe for BenefitScore
impl Send for BenefitScore
impl Sync for BenefitScore
impl Unpin for BenefitScore
impl UnsafeUnpin for BenefitScore
impl UnwindSafe for BenefitScore
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more