pub struct Percent(u32);
Tuple Fields§
§0: u32
Implementations§
source§impl Percent
impl Percent
pub const MAX: Self = _
pub const SCALE: Self = _
sourcepub const fn from_percent(percent: u32) -> Self
pub const fn from_percent(percent: u32) -> Self
Builds a new Percent
with the provided percent value.
§Panics
Panics if the provided value is larger than 100.
sourcepub fn from_ratio(ratio: f32) -> Self
pub fn from_ratio(ratio: f32) -> Self
Builds a new Percent
with the provided ratio.
§Panics
Panics if the provided radio is out of the range [0.0, 1.0].
source§impl Percent
impl Percent
pub const fn checked_add(self, rhs: Self) -> Option<Self>
pub const fn saturating_add(self, rhs: Self) -> Self
pub fn overflowing_add(self, rhs: Self) -> (Self, bool)
pub fn wrapping_add(self, rhs: Self) -> Self
pub const fn checked_sub(self, rhs: Self) -> Option<Self>
pub const fn saturating_sub(self, rhs: Self) -> Self
pub const fn overflowing_sub(self, rhs: Self) -> (Self, bool)
pub const fn wrapping_sub(self, rhs: Self) -> Self
pub fn absdiff(self, rhs: Self) -> Self
source§impl Percent
impl Percent
pub const fn checked_div(self, rhs: u32) -> Option<Self>
pub const fn saturating_div(self, rhs: u32) -> Self
pub const fn checked_mul(self, rhs: u32) -> Option<Self>
pub const fn saturating_mul(self, rhs: u32) -> Self
pub fn overflowing_mul(self, rhs: u32) -> (Self, bool)
pub fn wrapping_mul(self, rhs: u32) -> Self
pub const fn checked_rem(self, rhs: u32) -> Option<Self>
Methods from Deref<Target = u32>§
pub const MIN: u32 = 0u32
pub const MAX: u32 = 4_294_967_295u32
pub const BITS: u32 = 32u32
Trait Implementations§
source§impl AddAssign<Percent> for Signed<Percent>
impl AddAssign<Percent> for Signed<Percent>
source§fn add_assign(&mut self, other: Percent)
fn add_assign(&mut self, other: Percent)
Performs the
+=
operation. Read moresource§impl AddAssign for Percent
impl AddAssign for Percent
source§fn add_assign(&mut self, rhs: Percent)
fn add_assign(&mut self, rhs: Percent)
Performs the
+=
operation. Read moresource§impl DivAssign<u32> for Percent
impl DivAssign<u32> for Percent
source§fn div_assign(&mut self, rhs: u32)
fn div_assign(&mut self, rhs: u32)
Performs the
/=
operation. Read moresource§impl FormattedValue for Percent
impl FormattedValue for Percent
source§impl From<Percent> for GenericFormattedValue
impl From<Percent> for GenericFormattedValue
source§impl MulAssign<u32> for Percent
impl MulAssign<u32> for Percent
source§fn mul_assign(&mut self, rhs: u32)
fn mul_assign(&mut self, rhs: u32)
Performs the
*=
operation. Read moresource§impl MulDiv<u32> for Percent
impl MulDiv<u32> for Percent
source§fn mul_div_floor(self, num: u32, denom: u32) -> Option<Self>
fn mul_div_floor(self, num: u32, denom: u32) -> Option<Self>
Calculates
floor(val * num / denom)
, i.e. the largest integer less than or equal to the
result of the division. Read moresource§fn mul_div_round(self, num: u32, denom: u32) -> Option<Self>
fn mul_div_round(self, num: u32, denom: u32) -> Option<Self>
Calculates
round(val * num / denom)
, i.e. the closest integer to the result of the
division. If both surrounding integers are the same distance (x.5
), the one with the bigger
absolute value is returned (round away from 0.0). Read moresource§impl OptionCheckedAdd for Percent
impl OptionCheckedAdd for Percent
source§impl OptionCheckedDiv<u32> for Percent
impl OptionCheckedDiv<u32> for Percent
source§impl OptionCheckedDiv for Percent
impl OptionCheckedDiv for Percent
source§impl OptionCheckedMul<Percent> for u32
impl OptionCheckedMul<Percent> for u32
source§impl OptionCheckedMul<u32> for Percent
impl OptionCheckedMul<u32> for Percent
source§impl OptionCheckedRem<u32> for Percent
impl OptionCheckedRem<u32> for Percent
source§impl OptionCheckedRem for Percent
impl OptionCheckedRem for Percent
source§impl OptionCheckedSub for Percent
impl OptionCheckedSub for Percent
source§impl OptionOverflowingAdd for Percent
impl OptionOverflowingAdd for Percent
source§impl OptionOverflowingMul<Percent> for u32
impl OptionOverflowingMul<Percent> for u32
source§impl OptionOverflowingMul<u32> for Percent
impl OptionOverflowingMul<u32> for Percent
source§impl OptionOverflowingSub for Percent
impl OptionOverflowingSub for Percent
source§impl OptionSaturatingAdd for Percent
impl OptionSaturatingAdd for Percent
source§impl OptionSaturatingMul<Percent> for u32
impl OptionSaturatingMul<Percent> for u32
source§impl OptionSaturatingMul<u32> for Percent
impl OptionSaturatingMul<u32> for Percent
source§impl OptionSaturatingSub for Percent
impl OptionSaturatingSub for Percent
source§impl OptionWrappingAdd for Percent
impl OptionWrappingAdd for Percent
source§impl OptionWrappingMul<Percent> for u32
impl OptionWrappingMul<Percent> for u32
source§impl OptionWrappingMul<u32> for Percent
impl OptionWrappingMul<u32> for Percent
source§impl OptionWrappingSub for Percent
impl OptionWrappingSub for Percent
source§impl Ord for Percent
impl Ord for Percent
source§impl PartialOrd<Percent> for Signed<Percent>
impl PartialOrd<Percent> for Signed<Percent>
source§impl PartialOrd<Signed<Percent>> for Percent
impl PartialOrd<Signed<Percent>> for Percent
source§impl PartialOrd for Percent
impl PartialOrd for Percent
source§impl RemAssign<u32> for Percent
impl RemAssign<u32> for Percent
source§fn rem_assign(&mut self, rhs: u32)
fn rem_assign(&mut self, rhs: u32)
Performs the
%=
operation. Read moresource§impl SubAssign<Percent> for Signed<Percent>
impl SubAssign<Percent> for Signed<Percent>
source§fn sub_assign(&mut self, other: Percent)
fn sub_assign(&mut self, other: Percent)
Performs the
-=
operation. Read moresource§impl SubAssign for Percent
impl SubAssign for Percent
source§fn sub_assign(&mut self, rhs: Percent)
fn sub_assign(&mut self, rhs: Percent)
Performs the
-=
operation. Read moresource§impl TryFromGlib<i64> for Percent
impl TryFromGlib<i64> for Percent
type Error = GlibNoneError
unsafe fn try_from_glib(value: i64) -> Result<Self, Self::Error>
source§impl UnsignedIntoSigned for Percent
impl UnsignedIntoSigned for Percent
type Signed = Signed<Percent>
source§fn into_positive(self) -> Self::Signed
fn into_positive(self) -> Self::Signed
Converts
self
into a Signed::Positive
.source§fn into_negative(self) -> Self::Signed
fn into_negative(self) -> Self::Signed
Converts
self
into a Signed::Negative
.source§fn into_signed(self, sign: i32) -> Self::Signed
fn into_signed(self, sign: i32) -> Self::Signed
Converts
self
into a Signed
matching the given sign
.impl Copy for Percent
impl Eq for Percent
impl FormattedValueIntrinsic for Percent
impl OptionOperations for Percent
impl SignedIntrinsic for Percent
impl SpecificFormattedValueIntrinsic for Percent
impl StructuralPartialEq for Percent
Auto Trait Implementations§
impl Freeze for Percent
impl RefUnwindSafe for Percent
impl Send for Percent
impl Sync for Percent
impl Unpin for Percent
impl UnwindSafe for Percent
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T, InnerRhs> OptionAdd<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionAdd<InnerRhs>,
impl<T, InnerRhs> OptionAdd<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionAdd<InnerRhs>,
source§impl<T, Rhs> OptionAdd<Rhs> for Twhere
T: OptionOperations + Add<Rhs>,
impl<T, Rhs> OptionAdd<Rhs> for Twhere
T: OptionOperations + Add<Rhs>,
source§impl<T, InnerRhs> OptionAddAssign<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionAddAssign<&Option<InnerRhs>, InnerRhs> for T
source§fn opt_add_assign(&mut self, rhs: &Option<InnerRhs>)
fn opt_add_assign(&mut self, rhs: &Option<InnerRhs>)
Performs the addition assignment. Read more
source§impl<T, InnerRhs> OptionAddAssign<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionAddAssign<InnerRhs>,
impl<T, InnerRhs> OptionAddAssign<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionAddAssign<InnerRhs>,
source§fn opt_add_assign(&mut self, rhs: Option<InnerRhs>)
fn opt_add_assign(&mut self, rhs: Option<InnerRhs>)
Performs the addition assignment. Read more
source§impl<T, Rhs> OptionAddAssign<Rhs> for Twhere
T: OptionOperations + AddAssign<Rhs>,
impl<T, Rhs> OptionAddAssign<Rhs> for Twhere
T: OptionOperations + AddAssign<Rhs>,
source§fn opt_add_assign(&mut self, rhs: Rhs)
fn opt_add_assign(&mut self, rhs: Rhs)
Performs the addition assignment. Read more
source§impl<T, InnerRhs> OptionCheckedAdd<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionCheckedAdd<&Option<InnerRhs>, InnerRhs> for T
source§type Output = <T as OptionCheckedAdd<InnerRhs>>::Output
type Output = <T as OptionCheckedAdd<InnerRhs>>::Output
The resulting inner type after applying the addition.
source§impl<T, InnerRhs> OptionCheckedAdd<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionCheckedAdd<InnerRhs>,
impl<T, InnerRhs> OptionCheckedAdd<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionCheckedAdd<InnerRhs>,
source§impl<T, InnerRhs> OptionCheckedDiv<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionCheckedDiv<&Option<InnerRhs>, InnerRhs> for T
source§type Output = <T as OptionCheckedDiv<InnerRhs>>::Output
type Output = <T as OptionCheckedDiv<InnerRhs>>::Output
The resulting inner type after applying the division.
source§impl<T, InnerRhs> OptionCheckedDiv<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionCheckedDiv<InnerRhs>,
impl<T, InnerRhs> OptionCheckedDiv<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionCheckedDiv<InnerRhs>,
source§impl<T, InnerRhs> OptionCheckedMul<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionCheckedMul<&Option<InnerRhs>, InnerRhs> for T
source§type Output = <T as OptionCheckedMul<InnerRhs>>::Output
type Output = <T as OptionCheckedMul<InnerRhs>>::Output
The resulting inner type after applying the multiplication.
source§impl<T, InnerRhs> OptionCheckedMul<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionCheckedMul<InnerRhs>,
impl<T, InnerRhs> OptionCheckedMul<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionCheckedMul<InnerRhs>,
source§type Output = <T as OptionCheckedMul<InnerRhs>>::Output
type Output = <T as OptionCheckedMul<InnerRhs>>::Output
The resulting inner type after applying the multiplication.
source§impl<T, InnerRhs> OptionCheckedRem<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionCheckedRem<&Option<InnerRhs>, InnerRhs> for T
source§type Output = <T as OptionCheckedRem<InnerRhs>>::Output
type Output = <T as OptionCheckedRem<InnerRhs>>::Output
The resulting inner type after applying the remainder.
source§impl<T, InnerRhs> OptionCheckedRem<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionCheckedRem<InnerRhs>,
impl<T, InnerRhs> OptionCheckedRem<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionCheckedRem<InnerRhs>,
source§type Output = <T as OptionCheckedRem<InnerRhs>>::Output
type Output = <T as OptionCheckedRem<InnerRhs>>::Output
The resulting inner type after applying the remainder.
source§impl<T, InnerRhs> OptionCheckedSub<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionCheckedSub<&Option<InnerRhs>, InnerRhs> for T
source§type Output = <T as OptionCheckedSub<InnerRhs>>::Output
type Output = <T as OptionCheckedSub<InnerRhs>>::Output
The resulting inner type after applying the substraction.
source§impl<T, InnerRhs> OptionCheckedSub<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionCheckedSub<InnerRhs>,
impl<T, InnerRhs> OptionCheckedSub<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionCheckedSub<InnerRhs>,
source§type Output = <T as OptionCheckedSub<InnerRhs>>::Output
type Output = <T as OptionCheckedSub<InnerRhs>>::Output
The resulting inner type after applying the substraction.
source§impl<T, InnerRhs> OptionDiv<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionDiv<InnerRhs>,
impl<T, InnerRhs> OptionDiv<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionDiv<InnerRhs>,
source§impl<T, Rhs> OptionDiv<Rhs> for Twhere
T: OptionOperations + Div<Rhs>,
impl<T, Rhs> OptionDiv<Rhs> for Twhere
T: OptionOperations + Div<Rhs>,
source§impl<T, InnerRhs> OptionDivAssign<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionDivAssign<&Option<InnerRhs>, InnerRhs> for T
source§fn opt_div_assign(&mut self, rhs: &Option<InnerRhs>)
fn opt_div_assign(&mut self, rhs: &Option<InnerRhs>)
Performs the division assignment. Read more
source§impl<T, InnerRhs> OptionDivAssign<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionDivAssign<InnerRhs>,
impl<T, InnerRhs> OptionDivAssign<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionDivAssign<InnerRhs>,
source§fn opt_div_assign(&mut self, rhs: Option<InnerRhs>)
fn opt_div_assign(&mut self, rhs: Option<InnerRhs>)
Performs the division assignment. Read more
source§impl<T, Rhs> OptionDivAssign<Rhs> for Twhere
T: OptionOperations + DivAssign<Rhs>,
impl<T, Rhs> OptionDivAssign<Rhs> for Twhere
T: OptionOperations + DivAssign<Rhs>,
source§fn opt_div_assign(&mut self, rhs: Rhs)
fn opt_div_assign(&mut self, rhs: Rhs)
Performs the division assignment. Read more
source§impl<T> OptionMinMax<Option<T>, T> for T
impl<T> OptionMinMax<Option<T>, T> for T
source§impl<T> OptionMinMax<T> for T
impl<T> OptionMinMax<T> for T
source§impl<T, InnerRhs> OptionMul<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionMul<InnerRhs>,
impl<T, InnerRhs> OptionMul<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionMul<InnerRhs>,
source§impl<T, Rhs> OptionMul<Rhs> for Twhere
T: OptionOperations + Mul<Rhs>,
impl<T, Rhs> OptionMul<Rhs> for Twhere
T: OptionOperations + Mul<Rhs>,
source§impl<T, InnerRhs> OptionMulAssign<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionMulAssign<&Option<InnerRhs>, InnerRhs> for T
source§fn opt_mul_assign(&mut self, rhs: &Option<InnerRhs>)
fn opt_mul_assign(&mut self, rhs: &Option<InnerRhs>)
Performs the multiplication assignment. Read more
source§impl<T, InnerRhs> OptionMulAssign<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionMulAssign<InnerRhs>,
impl<T, InnerRhs> OptionMulAssign<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionMulAssign<InnerRhs>,
source§fn opt_mul_assign(&mut self, rhs: Option<InnerRhs>)
fn opt_mul_assign(&mut self, rhs: Option<InnerRhs>)
Performs the multiplication assignment. Read more
source§impl<T, Rhs> OptionMulAssign<Rhs> for Twhere
T: OptionOperations + MulAssign<Rhs>,
impl<T, Rhs> OptionMulAssign<Rhs> for Twhere
T: OptionOperations + MulAssign<Rhs>,
source§fn opt_mul_assign(&mut self, rhs: Rhs)
fn opt_mul_assign(&mut self, rhs: Rhs)
Performs the multiplication assignment. Read more
source§impl<T, InnerRhs> OptionOrd<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionOrd<&Option<InnerRhs>, InnerRhs> for T
source§impl<T, Rhs> OptionOrd<&Rhs, Rhs> for Twhere
T: OptionOperations + PartialOrd<Rhs>,
impl<T, Rhs> OptionOrd<&Rhs, Rhs> for Twhere
T: OptionOperations + PartialOrd<Rhs>,
source§impl<T, InnerRhs> OptionOrd<Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionOrd<Option<InnerRhs>, InnerRhs> for T
source§impl<T, Rhs> OptionOrd<Rhs> for T
impl<T, Rhs> OptionOrd<Rhs> for T
source§impl<T, InnerRhs> OptionOverflowingAdd<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionOverflowingAdd<&Option<InnerRhs>, InnerRhs> for T
source§type Output = <T as OptionOverflowingAdd<InnerRhs>>::Output
type Output = <T as OptionOverflowingAdd<InnerRhs>>::Output
The resulting inner type after applying the addition.
source§fn opt_overflowing_add(
self,
rhs: &Option<InnerRhs>,
) -> Option<(<T as OptionOverflowingAdd<&Option<InnerRhs>, InnerRhs>>::Output, bool)>
fn opt_overflowing_add( self, rhs: &Option<InnerRhs>, ) -> Option<(<T as OptionOverflowingAdd<&Option<InnerRhs>, InnerRhs>>::Output, bool)>
Returns a tuple of the addition
along with a boolean indicating whether an arithmetic overflow
would occur. If an overflow would have occurred then
self
is returned. Read moresource§impl<T, InnerRhs> OptionOverflowingAdd<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionOverflowingAdd<InnerRhs>,
impl<T, InnerRhs> OptionOverflowingAdd<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionOverflowingAdd<InnerRhs>,
source§type Output = <T as OptionOverflowingAdd<InnerRhs>>::Output
type Output = <T as OptionOverflowingAdd<InnerRhs>>::Output
The resulting inner type after applying the addition.
source§fn opt_overflowing_add(
self,
rhs: Option<InnerRhs>,
) -> Option<(<T as OptionOverflowingAdd<Option<InnerRhs>, InnerRhs>>::Output, bool)>
fn opt_overflowing_add( self, rhs: Option<InnerRhs>, ) -> Option<(<T as OptionOverflowingAdd<Option<InnerRhs>, InnerRhs>>::Output, bool)>
Returns a tuple of the addition
along with a boolean indicating whether an arithmetic overflow
would occur. If an overflow would have occurred then
self
is returned. Read moresource§impl<T, InnerRhs> OptionOverflowingMul<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionOverflowingMul<&Option<InnerRhs>, InnerRhs> for T
source§type Output = <T as OptionOverflowingMul<InnerRhs>>::Output
type Output = <T as OptionOverflowingMul<InnerRhs>>::Output
The resulting inner type after applying the multiplication.
source§fn opt_overflowing_mul(
self,
rhs: &Option<InnerRhs>,
) -> Option<(<T as OptionOverflowingMul<&Option<InnerRhs>, InnerRhs>>::Output, bool)>
fn opt_overflowing_mul( self, rhs: &Option<InnerRhs>, ) -> Option<(<T as OptionOverflowingMul<&Option<InnerRhs>, InnerRhs>>::Output, bool)>
Returns a tuple of the multiplication
along with a boolean indicating whether an arithmetic overflow
would occur. If an overflow would have occurred then
self
is returned. Read moresource§impl<T, InnerRhs> OptionOverflowingMul<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionOverflowingMul<InnerRhs>,
impl<T, InnerRhs> OptionOverflowingMul<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionOverflowingMul<InnerRhs>,
source§type Output = <T as OptionOverflowingMul<InnerRhs>>::Output
type Output = <T as OptionOverflowingMul<InnerRhs>>::Output
The resulting inner type after applying the multiplication.
source§fn opt_overflowing_mul(
self,
rhs: Option<InnerRhs>,
) -> Option<(<T as OptionOverflowingMul<Option<InnerRhs>, InnerRhs>>::Output, bool)>
fn opt_overflowing_mul( self, rhs: Option<InnerRhs>, ) -> Option<(<T as OptionOverflowingMul<Option<InnerRhs>, InnerRhs>>::Output, bool)>
Returns a tuple of the multiplication
along with a boolean indicating whether an arithmetic overflow
would occur. If an overflow would have occurred then
self
is returned. Read moresource§impl<T, InnerRhs> OptionOverflowingSub<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionOverflowingSub<&Option<InnerRhs>, InnerRhs> for T
source§type Output = <T as OptionOverflowingSub<InnerRhs>>::Output
type Output = <T as OptionOverflowingSub<InnerRhs>>::Output
The resulting inner type after applying the substraction.
source§fn opt_overflowing_sub(
self,
rhs: &Option<InnerRhs>,
) -> Option<(<T as OptionOverflowingSub<&Option<InnerRhs>, InnerRhs>>::Output, bool)>
fn opt_overflowing_sub( self, rhs: &Option<InnerRhs>, ) -> Option<(<T as OptionOverflowingSub<&Option<InnerRhs>, InnerRhs>>::Output, bool)>
Returns a tuple of the substraction
along with a boolean indicating whether an arithmetic overflow
would occur. If an overflow would have occurred then
self
is returned. Read moresource§impl<T, InnerRhs> OptionOverflowingSub<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionOverflowingSub<InnerRhs>,
impl<T, InnerRhs> OptionOverflowingSub<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionOverflowingSub<InnerRhs>,
source§type Output = <T as OptionOverflowingSub<InnerRhs>>::Output
type Output = <T as OptionOverflowingSub<InnerRhs>>::Output
The resulting inner type after applying the substraction.
source§fn opt_overflowing_sub(
self,
rhs: Option<InnerRhs>,
) -> Option<(<T as OptionOverflowingSub<Option<InnerRhs>, InnerRhs>>::Output, bool)>
fn opt_overflowing_sub( self, rhs: Option<InnerRhs>, ) -> Option<(<T as OptionOverflowingSub<Option<InnerRhs>, InnerRhs>>::Output, bool)>
Returns a tuple of the substraction
along with a boolean indicating whether an arithmetic overflow
would occur. If an overflow would have occurred then
self
is returned. Read moresource§impl<T, InnerRhs> OptionRem<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionRem<InnerRhs>,
impl<T, InnerRhs> OptionRem<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionRem<InnerRhs>,
source§impl<T, Rhs> OptionRem<Rhs> for Twhere
T: OptionOperations + Rem<Rhs>,
impl<T, Rhs> OptionRem<Rhs> for Twhere
T: OptionOperations + Rem<Rhs>,
source§impl<T, InnerRhs> OptionRemAssign<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionRemAssign<&Option<InnerRhs>, InnerRhs> for T
source§fn opt_rem_assign(&mut self, rhs: &Option<InnerRhs>)
fn opt_rem_assign(&mut self, rhs: &Option<InnerRhs>)
Performs the remainder assignment. Read more
source§impl<T, InnerRhs> OptionRemAssign<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionRemAssign<InnerRhs>,
impl<T, InnerRhs> OptionRemAssign<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionRemAssign<InnerRhs>,
source§fn opt_rem_assign(&mut self, rhs: Option<InnerRhs>)
fn opt_rem_assign(&mut self, rhs: Option<InnerRhs>)
Performs the remainder assignment. Read more
source§impl<T, Rhs> OptionRemAssign<Rhs> for Twhere
T: OptionOperations + RemAssign<Rhs>,
impl<T, Rhs> OptionRemAssign<Rhs> for Twhere
T: OptionOperations + RemAssign<Rhs>,
source§fn opt_rem_assign(&mut self, rhs: Rhs)
fn opt_rem_assign(&mut self, rhs: Rhs)
Performs the remainder assignment. Read more
source§impl<T, InnerRhs> OptionSaturatingAdd<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionSaturatingAdd<&Option<InnerRhs>, InnerRhs> for T
source§type Output = <T as OptionSaturatingAdd<InnerRhs>>::Output
type Output = <T as OptionSaturatingAdd<InnerRhs>>::Output
The resulting inner type after applying the addition.
source§fn opt_saturating_add(
self,
rhs: &Option<InnerRhs>,
) -> Option<<T as OptionSaturatingAdd<&Option<InnerRhs>, InnerRhs>>::Output>
fn opt_saturating_add( self, rhs: &Option<InnerRhs>, ) -> Option<<T as OptionSaturatingAdd<&Option<InnerRhs>, InnerRhs>>::Output>
Computes the addition
saturating at the numeric bounds instead of overflowing. Read more
source§impl<T, InnerRhs> OptionSaturatingAdd<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionSaturatingAdd<InnerRhs>,
impl<T, InnerRhs> OptionSaturatingAdd<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionSaturatingAdd<InnerRhs>,
source§type Output = <T as OptionSaturatingAdd<InnerRhs>>::Output
type Output = <T as OptionSaturatingAdd<InnerRhs>>::Output
The resulting inner type after applying the addition.
source§fn opt_saturating_add(
self,
rhs: Option<InnerRhs>,
) -> Option<<T as OptionSaturatingAdd<Option<InnerRhs>, InnerRhs>>::Output>
fn opt_saturating_add( self, rhs: Option<InnerRhs>, ) -> Option<<T as OptionSaturatingAdd<Option<InnerRhs>, InnerRhs>>::Output>
Computes the addition
saturating at the numeric bounds instead of overflowing. Read more
source§impl<T, InnerRhs> OptionSaturatingMul<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionSaturatingMul<&Option<InnerRhs>, InnerRhs> for T
source§type Output = <T as OptionSaturatingMul<InnerRhs>>::Output
type Output = <T as OptionSaturatingMul<InnerRhs>>::Output
The resulting inner type after applying the multiplication.
source§fn opt_saturating_mul(
self,
rhs: &Option<InnerRhs>,
) -> Option<<T as OptionSaturatingMul<&Option<InnerRhs>, InnerRhs>>::Output>
fn opt_saturating_mul( self, rhs: &Option<InnerRhs>, ) -> Option<<T as OptionSaturatingMul<&Option<InnerRhs>, InnerRhs>>::Output>
Computes the multiplication
saturating at the numeric bounds instead of overflowing. Read more
source§impl<T, InnerRhs> OptionSaturatingMul<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionSaturatingMul<InnerRhs>,
impl<T, InnerRhs> OptionSaturatingMul<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionSaturatingMul<InnerRhs>,
source§type Output = <T as OptionSaturatingMul<InnerRhs>>::Output
type Output = <T as OptionSaturatingMul<InnerRhs>>::Output
The resulting inner type after applying the multiplication.
source§fn opt_saturating_mul(
self,
rhs: Option<InnerRhs>,
) -> Option<<T as OptionSaturatingMul<Option<InnerRhs>, InnerRhs>>::Output>
fn opt_saturating_mul( self, rhs: Option<InnerRhs>, ) -> Option<<T as OptionSaturatingMul<Option<InnerRhs>, InnerRhs>>::Output>
Computes the multiplication
saturating at the numeric bounds instead of overflowing. Read more
source§impl<T, InnerRhs> OptionSaturatingSub<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionSaturatingSub<&Option<InnerRhs>, InnerRhs> for T
source§type Output = <T as OptionSaturatingSub<InnerRhs>>::Output
type Output = <T as OptionSaturatingSub<InnerRhs>>::Output
The resulting inner type after applying the substraction.
source§fn opt_saturating_sub(
self,
rhs: &Option<InnerRhs>,
) -> Option<<T as OptionSaturatingSub<&Option<InnerRhs>, InnerRhs>>::Output>
fn opt_saturating_sub( self, rhs: &Option<InnerRhs>, ) -> Option<<T as OptionSaturatingSub<&Option<InnerRhs>, InnerRhs>>::Output>
Computes the substraction
saturating at the numeric bounds instead of overflowing. Read more
source§impl<T, InnerRhs> OptionSaturatingSub<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionSaturatingSub<InnerRhs>,
impl<T, InnerRhs> OptionSaturatingSub<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionSaturatingSub<InnerRhs>,
source§type Output = <T as OptionSaturatingSub<InnerRhs>>::Output
type Output = <T as OptionSaturatingSub<InnerRhs>>::Output
The resulting inner type after applying the substraction.
source§fn opt_saturating_sub(
self,
rhs: Option<InnerRhs>,
) -> Option<<T as OptionSaturatingSub<Option<InnerRhs>, InnerRhs>>::Output>
fn opt_saturating_sub( self, rhs: Option<InnerRhs>, ) -> Option<<T as OptionSaturatingSub<Option<InnerRhs>, InnerRhs>>::Output>
Computes the substraction
saturating at the numeric bounds instead of overflowing. Read more
source§impl<T, InnerRhs> OptionSub<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionSub<InnerRhs>,
impl<T, InnerRhs> OptionSub<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionSub<InnerRhs>,
source§impl<T, Rhs> OptionSub<Rhs> for Twhere
T: OptionOperations + Sub<Rhs>,
impl<T, Rhs> OptionSub<Rhs> for Twhere
T: OptionOperations + Sub<Rhs>,
source§impl<T, InnerRhs> OptionSubAssign<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionSubAssign<&Option<InnerRhs>, InnerRhs> for T
source§fn opt_sub_assign(&mut self, rhs: &Option<InnerRhs>)
fn opt_sub_assign(&mut self, rhs: &Option<InnerRhs>)
Performs the substraction assignment. Read more
source§impl<T, InnerRhs> OptionSubAssign<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionSubAssign<InnerRhs>,
impl<T, InnerRhs> OptionSubAssign<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionSubAssign<InnerRhs>,
source§fn opt_sub_assign(&mut self, rhs: Option<InnerRhs>)
fn opt_sub_assign(&mut self, rhs: Option<InnerRhs>)
Performs the substraction assignment. Read more
source§impl<T, Rhs> OptionSubAssign<Rhs> for Twhere
T: OptionOperations + SubAssign<Rhs>,
impl<T, Rhs> OptionSubAssign<Rhs> for Twhere
T: OptionOperations + SubAssign<Rhs>,
source§fn opt_sub_assign(&mut self, rhs: Rhs)
fn opt_sub_assign(&mut self, rhs: Rhs)
Performs the substraction assignment. Read more
source§impl<T, InnerRhs> OptionWrappingAdd<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionWrappingAdd<&Option<InnerRhs>, InnerRhs> for T
source§type Output = <T as OptionWrappingAdd<InnerRhs>>::Output
type Output = <T as OptionWrappingAdd<InnerRhs>>::Output
The resulting inner type after applying the addition.
source§fn opt_wrapping_add(
self,
rhs: &Option<InnerRhs>,
) -> Option<<T as OptionWrappingAdd<&Option<InnerRhs>, InnerRhs>>::Output>
fn opt_wrapping_add( self, rhs: &Option<InnerRhs>, ) -> Option<<T as OptionWrappingAdd<&Option<InnerRhs>, InnerRhs>>::Output>
Computes the addition
wrapping at the numeric bounds instead of overflowing. Read more
source§impl<T, InnerRhs> OptionWrappingAdd<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionWrappingAdd<InnerRhs>,
impl<T, InnerRhs> OptionWrappingAdd<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionWrappingAdd<InnerRhs>,
source§type Output = <T as OptionWrappingAdd<InnerRhs>>::Output
type Output = <T as OptionWrappingAdd<InnerRhs>>::Output
The resulting inner type after applying the addition.
source§fn opt_wrapping_add(
self,
rhs: Option<InnerRhs>,
) -> Option<<T as OptionWrappingAdd<Option<InnerRhs>, InnerRhs>>::Output>
fn opt_wrapping_add( self, rhs: Option<InnerRhs>, ) -> Option<<T as OptionWrappingAdd<Option<InnerRhs>, InnerRhs>>::Output>
Computes the addition
wrapping at the numeric bounds instead of overflowing. Read more
source§impl<T, InnerRhs> OptionWrappingMul<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionWrappingMul<&Option<InnerRhs>, InnerRhs> for T
source§type Output = <T as OptionWrappingMul<InnerRhs>>::Output
type Output = <T as OptionWrappingMul<InnerRhs>>::Output
The resulting inner type after applying the multiplication.
source§fn opt_wrapping_mul(
self,
rhs: &Option<InnerRhs>,
) -> Option<<T as OptionWrappingMul<&Option<InnerRhs>, InnerRhs>>::Output>
fn opt_wrapping_mul( self, rhs: &Option<InnerRhs>, ) -> Option<<T as OptionWrappingMul<&Option<InnerRhs>, InnerRhs>>::Output>
Computes the multiplication
wrapping at the numeric bounds instead of overflowing. Read more
source§impl<T, InnerRhs> OptionWrappingMul<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionWrappingMul<InnerRhs>,
impl<T, InnerRhs> OptionWrappingMul<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionWrappingMul<InnerRhs>,
source§type Output = <T as OptionWrappingMul<InnerRhs>>::Output
type Output = <T as OptionWrappingMul<InnerRhs>>::Output
The resulting inner type after applying the multiplication.
source§fn opt_wrapping_mul(
self,
rhs: Option<InnerRhs>,
) -> Option<<T as OptionWrappingMul<Option<InnerRhs>, InnerRhs>>::Output>
fn opt_wrapping_mul( self, rhs: Option<InnerRhs>, ) -> Option<<T as OptionWrappingMul<Option<InnerRhs>, InnerRhs>>::Output>
Computes the multiplication
wrapping at the numeric bounds instead of overflowing. Read more
source§impl<T, InnerRhs> OptionWrappingSub<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionWrappingSub<&Option<InnerRhs>, InnerRhs> for T
source§type Output = <T as OptionWrappingSub<InnerRhs>>::Output
type Output = <T as OptionWrappingSub<InnerRhs>>::Output
The resulting inner type after applying the substraction.
source§fn opt_wrapping_sub(
self,
rhs: &Option<InnerRhs>,
) -> Option<<T as OptionWrappingSub<&Option<InnerRhs>, InnerRhs>>::Output>
fn opt_wrapping_sub( self, rhs: &Option<InnerRhs>, ) -> Option<<T as OptionWrappingSub<&Option<InnerRhs>, InnerRhs>>::Output>
Computes the substraction
wrapping at the numeric bounds instead of overflowing. Read more
source§impl<T, InnerRhs> OptionWrappingSub<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionWrappingSub<InnerRhs>,
impl<T, InnerRhs> OptionWrappingSub<Option<InnerRhs>, InnerRhs> for Twhere
T: OptionOperations + OptionWrappingSub<InnerRhs>,
source§type Output = <T as OptionWrappingSub<InnerRhs>>::Output
type Output = <T as OptionWrappingSub<InnerRhs>>::Output
The resulting inner type after applying the substraction.
source§fn opt_wrapping_sub(
self,
rhs: Option<InnerRhs>,
) -> Option<<T as OptionWrappingSub<Option<InnerRhs>, InnerRhs>>::Output>
fn opt_wrapping_sub( self, rhs: Option<InnerRhs>, ) -> Option<<T as OptionWrappingSub<Option<InnerRhs>, InnerRhs>>::Output>
Computes the substraction
wrapping at the numeric bounds instead of overflowing. Read more