[−][src]Struct decimal_percentage::Percentage
Percentage Type
- Example:
let p1 = Percentage::from(0.1f64); let p2 = Percentage::from(0.1f32); let p3 = Percentage::try_from("0.1").unwrap(); assert_eq!(p1 + p2, Percentage::from(0.2)); assert_eq!(p1 + 0.2, Percentage::from(0.3));
Trait Implementations
impl Add<Decimal> for Percentage
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: Decimal) -> Self::Output
[src]
impl Add<Percentage> for Percentage
[src]
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: Self) -> Self::Output
[src]
impl Add<Percentage> for Decimal
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: Percentage) -> Self::Output
[src]
impl Add<Percentage> for u32
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: Percentage) -> Self::Output
[src]
impl Add<Percentage> for u64
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: Percentage) -> Self::Output
[src]
impl Add<Percentage> for f64
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: Percentage) -> Self::Output
[src]
impl Add<Percentage> for f32
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: Percentage) -> Self::Output
[src]
impl Add<Percentage> for isize
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: Percentage) -> Self::Output
[src]
impl Add<Percentage> for i8
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: Percentage) -> Self::Output
[src]
impl Add<Percentage> for i16
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: Percentage) -> Self::Output
[src]
impl Add<Percentage> for i32
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: Percentage) -> Self::Output
[src]
impl Add<Percentage> for i64
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: Percentage) -> Self::Output
[src]
impl Add<Percentage> for usize
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: Percentage) -> Self::Output
[src]
impl Add<Percentage> for u8
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: Percentage) -> Self::Output
[src]
impl Add<Percentage> for u16
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: Percentage) -> Self::Output
[src]
impl Add<f32> for Percentage
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: f32) -> Self::Output
[src]
impl Add<f64> for Percentage
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: f64) -> Self::Output
[src]
impl Add<i16> for Percentage
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: i16) -> Self::Output
[src]
impl Add<i32> for Percentage
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: i32) -> Self::Output
[src]
impl Add<i64> for Percentage
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: i64) -> Self::Output
[src]
impl Add<i8> for Percentage
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: i8) -> Self::Output
[src]
impl Add<isize> for Percentage
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: isize) -> Self::Output
[src]
impl Add<u16> for Percentage
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: u16) -> Self::Output
[src]
impl Add<u32> for Percentage
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: u32) -> Self::Output
[src]
impl Add<u64> for Percentage
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: u64) -> Self::Output
[src]
impl Add<u8> for Percentage
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: u8) -> Self::Output
[src]
impl Add<usize> for Percentage
[src]
type Output = Percentage
The resulting type after applying the +
operator.
fn add(self, rhs: usize) -> Self::Output
[src]
impl Clone for Percentage
[src]
fn clone(&self) -> Percentage
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for Percentage
[src]
impl Debug for Percentage
[src]
impl Display for Percentage
[src]
impl Eq for Percentage
[src]
impl From<Decimal> for Percentage
[src]
impl From<f32> for Percentage
[src]
impl From<f64> for Percentage
[src]
impl<'a, 'b> Mul<&'a Percentage> for &'b Percentage
[src]
type Output = Percentage
The resulting type after applying the *
operator.
fn mul(self, rhs: &'a Percentage) -> Self::Output
[src]
impl Mul<Decimal> for Percentage
[src]
type Output = Decimal
The resulting type after applying the *
operator.
fn mul(self, rhs: Decimal) -> Self::Output
[src]
impl Mul<Percentage> for Percentage
[src]
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, rhs: Self) -> Self::Output
[src]
impl Mul<Percentage> for Decimal
[src]
type Output = Decimal
The resulting type after applying the *
operator.
fn mul(self, rhs: Percentage) -> Self::Output
[src]
impl Mul<Percentage> for u32
[src]
type Output = u32
The resulting type after applying the *
operator.
fn mul(self, rhs: Percentage) -> Self::Output
[src]
impl Mul<Percentage> for u64
[src]
type Output = u64
The resulting type after applying the *
operator.
fn mul(self, rhs: Percentage) -> Self::Output
[src]
impl Mul<Percentage> for f64
[src]
type Output = f64
The resulting type after applying the *
operator.
fn mul(self, rhs: Percentage) -> Self::Output
[src]
impl Mul<Percentage> for f32
[src]
type Output = f32
The resulting type after applying the *
operator.
fn mul(self, rhs: Percentage) -> Self::Output
[src]
impl Mul<Percentage> for isize
[src]
type Output = isize
The resulting type after applying the *
operator.
fn mul(self, rhs: Percentage) -> Self::Output
[src]
impl Mul<Percentage> for i8
[src]
type Output = i8
The resulting type after applying the *
operator.
fn mul(self, rhs: Percentage) -> Self::Output
[src]
impl Mul<Percentage> for i16
[src]
type Output = i16
The resulting type after applying the *
operator.
fn mul(self, rhs: Percentage) -> Self::Output
[src]
impl Mul<Percentage> for i32
[src]
type Output = i32
The resulting type after applying the *
operator.
fn mul(self, rhs: Percentage) -> Self::Output
[src]
impl Mul<Percentage> for i64
[src]
type Output = i64
The resulting type after applying the *
operator.
fn mul(self, rhs: Percentage) -> Self::Output
[src]
impl Mul<Percentage> for usize
[src]
type Output = usize
The resulting type after applying the *
operator.
fn mul(self, rhs: Percentage) -> Self::Output
[src]
impl Mul<Percentage> for u8
[src]
type Output = u8
The resulting type after applying the *
operator.
fn mul(self, rhs: Percentage) -> Self::Output
[src]
impl Mul<Percentage> for u16
[src]
type Output = u16
The resulting type after applying the *
operator.
fn mul(self, rhs: Percentage) -> Self::Output
[src]
impl Mul<f32> for Percentage
[src]
type Output = f32
The resulting type after applying the *
operator.
fn mul(self, rhs: f32) -> Self::Output
[src]
impl Mul<f64> for Percentage
[src]
type Output = f64
The resulting type after applying the *
operator.
fn mul(self, rhs: f64) -> Self::Output
[src]
impl Mul<i16> for Percentage
[src]
type Output = i16
The resulting type after applying the *
operator.
fn mul(self, rhs: i16) -> Self::Output
[src]
impl Mul<i32> for Percentage
[src]
type Output = i32
The resulting type after applying the *
operator.
fn mul(self, rhs: i32) -> Self::Output
[src]
impl Mul<i64> for Percentage
[src]
type Output = i64
The resulting type after applying the *
operator.
fn mul(self, rhs: i64) -> Self::Output
[src]
impl Mul<i8> for Percentage
[src]
type Output = i8
The resulting type after applying the *
operator.
fn mul(self, rhs: i8) -> Self::Output
[src]
impl Mul<isize> for Percentage
[src]
type Output = isize
The resulting type after applying the *
operator.
fn mul(self, rhs: isize) -> Self::Output
[src]
impl Mul<u16> for Percentage
[src]
type Output = u16
The resulting type after applying the *
operator.
fn mul(self, rhs: u16) -> Self::Output
[src]
impl Mul<u32> for Percentage
[src]
type Output = u32
The resulting type after applying the *
operator.
fn mul(self, rhs: u32) -> Self::Output
[src]
impl Mul<u64> for Percentage
[src]
type Output = u64
The resulting type after applying the *
operator.
fn mul(self, rhs: u64) -> Self::Output
[src]
impl Mul<u8> for Percentage
[src]
type Output = u8
The resulting type after applying the *
operator.
fn mul(self, rhs: u8) -> Self::Output
[src]
impl Mul<usize> for Percentage
[src]
type Output = usize
The resulting type after applying the *
operator.
fn mul(self, rhs: usize) -> Self::Output
[src]
impl PartialEq<Percentage> for Percentage
[src]
fn eq(&self, other: &Percentage) -> bool
[src]
fn ne(&self, other: &Percentage) -> bool
[src]
impl StructuralEq for Percentage
[src]
impl StructuralPartialEq for Percentage
[src]
impl Sub<Percentage> for Percentage
[src]
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Self::Output
[src]
impl Sub<Percentage> for isize
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: Percentage) -> Self::Output
[src]
impl Sub<Percentage> for u64
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: Percentage) -> Self::Output
[src]
impl Sub<Percentage> for f64
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: Percentage) -> Self::Output
[src]
impl Sub<Percentage> for f32
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: Percentage) -> Self::Output
[src]
impl Sub<Percentage> for i8
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: Percentage) -> Self::Output
[src]
impl Sub<Percentage> for i16
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: Percentage) -> Self::Output
[src]
impl Sub<Percentage> for i32
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: Percentage) -> Self::Output
[src]
impl Sub<Percentage> for i64
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: Percentage) -> Self::Output
[src]
impl Sub<Percentage> for usize
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: Percentage) -> Self::Output
[src]
impl Sub<Percentage> for u8
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: Percentage) -> Self::Output
[src]
impl Sub<Percentage> for u16
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: Percentage) -> Self::Output
[src]
impl Sub<Percentage> for u32
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: Percentage) -> Self::Output
[src]
impl Sub<f32> for Percentage
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: f32) -> Self::Output
[src]
impl Sub<f64> for Percentage
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: f64) -> Self::Output
[src]
impl Sub<i16> for Percentage
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: i16) -> Self::Output
[src]
impl Sub<i32> for Percentage
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: i32) -> Self::Output
[src]
impl Sub<i64> for Percentage
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: i64) -> Self::Output
[src]
impl Sub<i8> for Percentage
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: i8) -> Self::Output
[src]
impl Sub<isize> for Percentage
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: isize) -> Self::Output
[src]
impl Sub<u16> for Percentage
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: u16) -> Self::Output
[src]
impl Sub<u32> for Percentage
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: u32) -> Self::Output
[src]
impl Sub<u64> for Percentage
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: u64) -> Self::Output
[src]
impl Sub<u8> for Percentage
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: u8) -> Self::Output
[src]
impl Sub<usize> for Percentage
[src]
type Output = Percentage
The resulting type after applying the -
operator.
fn sub(self, rhs: usize) -> Self::Output
[src]
impl<'_> TryFrom<&'_ str> for Percentage
[src]
Auto Trait Implementations
impl RefUnwindSafe for Percentage
impl Send for Percentage
impl Sync for Percentage
impl Unpin for Percentage
impl UnwindSafe for Percentage
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,