pub struct Percent1000(pub i32);Expand description
Percentages stored in thousandths of a percent. A stored value of 75,000 represents 75 percent.
Tuple Fields§
§0: i32Implementations§
Source§impl Percent1000
impl Percent1000
pub fn from_percent(percent: f64) -> Self
pub fn to_fraction(self) -> f64
Trait Implementations§
Source§impl Clone for Percent1000
impl Clone for Percent1000
Source§fn clone(&self) -> Percent1000
fn clone(&self) -> Percent1000
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 Percent1000
Source§impl Debug for Percent1000
impl Debug for Percent1000
Source§impl Default for Percent1000
impl Default for Percent1000
Source§fn default() -> Percent1000
fn default() -> Percent1000
Returns the “default value” for a type. Read more
impl Eq for Percent1000
Source§impl Hash for Percent1000
impl Hash for Percent1000
Source§impl Ord for Percent1000
impl Ord for Percent1000
Source§fn cmp(&self, other: &Percent1000) -> Ordering
fn cmp(&self, other: &Percent1000) -> 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 Percent1000
impl PartialEq for Percent1000
Source§impl PartialOrd for Percent1000
impl PartialOrd for Percent1000
impl StructuralPartialEq for Percent1000
Auto Trait Implementations§
impl Freeze for Percent1000
impl RefUnwindSafe for Percent1000
impl Send for Percent1000
impl Sync for Percent1000
impl Unpin for Percent1000
impl UnsafeUnpin for Percent1000
impl UnwindSafe for Percent1000
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