Struct Bytes
Sourcepub struct Bytes(/* private fields */);Expand description
A Byte quantity
Some functions enforce format specific quantities. This type can be used when Bytes are expected. It comes with functions to perform computations without the need to retrieve the inner integer.
§Examples
// Regular constructors (can be used in `const` contexts)
const FORTY_TWO_BYTES: Bytes = Bytes::from_bytes(42);
const TWO_K: Bytes = Bytes::from_kibibytes(2);
let three_m = Bytes::from_mebibytes(3);
let four_g = Bytes::from_gibibytes(4);
// Convenience constructors (not `const`)
let forty_two_bytes = 42.bytes();
let two_k = 2.kibibytes();
let three_m = 3.mebibytes();
let four_g = 4.gibibytes();
// All four arithmetic operations
let limit = (2.kibibytes() + 512.bytes()) * 2 / 3;
// Comparisons
if limit > Bytes::KiB {
println!("Greater");
}See the documentation of the format module for more examples.
Implementations§
Source§impl Bytes
impl Bytes
Sourcepub const fn from_bytes(bytes: u64) -> Self
pub const fn from_bytes(bytes: u64) -> Self
Builds a new Bytes formatted value with the provided bytes count.
§Panics
Panics if the provided count equals u64::MAX,
which is reserved for None in C.
Sourcepub const fn from_kibibytes(kibibytes: u64) -> Self
pub const fn from_kibibytes(kibibytes: u64) -> Self
Builds a new Bytes formatted value with the provided kibibytes (1024) count.
§Panics
Panics if the resulting count equals u64::MAX,
which is reserved for None in C.
Sourcepub const fn from_mebibytes(mebibytes: u64) -> Self
pub const fn from_mebibytes(mebibytes: u64) -> Self
Builds a new Bytes formatted value with the provided mebibytes (1024 * 1024) count.
§Panics
Panics if the resulting count equals u64::MAX,
which is reserved for None in C.
Sourcepub const fn from_gibibytes(gibibytes: u64) -> Self
pub const fn from_gibibytes(gibibytes: u64) -> Self
Builds a new Bytes formatted value with the provided gibibytes (1024 * 1024 * 1024) count.
§Panics
Panics if the resulting count equals u64::MAX,
which is reserved for None in C.
Sourcepub const fn from_u64(bytes: u64) -> Self
pub const fn from_u64(bytes: u64) -> Self
Builds a new Bytes formatted value with the provided bytes count.
§Panics
Panics if the provided count equals u64::MAX,
which is reserved for None in C.
Sourcepub fn from_usize(bytes: usize) -> Self
pub fn from_usize(bytes: usize) -> Self
Builds a new Bytes formatted value with the provided bytes count.
§Panics
Panics if the provided count equals u64::MAX,
which is reserved for None in C.
Source§impl Bytes
impl Bytes
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 Bytes
impl Bytes
pub const fn checked_div(self, rhs: u64) -> Option<Self>
pub const fn saturating_div(self, rhs: u64) -> Self
pub const fn checked_mul(self, rhs: u64) -> Option<Self>
pub const fn saturating_mul(self, rhs: u64) -> Self
pub fn overflowing_mul(self, rhs: u64) -> (Self, bool)
pub fn wrapping_mul(self, rhs: u64) -> Self
pub const fn checked_rem(self, rhs: u64) -> Option<Self>
Trait Implementations§
Source§impl AddAssign<Bytes> for Signed<Bytes>
impl AddAssign<Bytes> for Signed<Bytes>
Source§fn add_assign(&mut self, other: Bytes)
fn add_assign(&mut self, other: Bytes)
+= operation. Read moreSource§impl AddAssign for Bytes
impl AddAssign for Bytes
Source§fn add_assign(&mut self, rhs: Bytes)
fn add_assign(&mut self, rhs: Bytes)
+= operation. Read moreSource§impl<'de> Deserialize<'de> for Bytes
impl<'de> Deserialize<'de> for Bytes
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Source§impl DivAssign<u64> for Bytes
impl DivAssign<u64> for Bytes
Source§fn div_assign(&mut self, rhs: u64)
fn div_assign(&mut self, rhs: u64)
/= operation. Read moreSource§impl FormattedValue for Bytes
impl FormattedValue for Bytes
Source§impl From<Bytes> for GenericFormattedValue
impl From<Bytes> for GenericFormattedValue
Source§impl MulAssign<u64> for Bytes
impl MulAssign<u64> for Bytes
Source§fn mul_assign(&mut self, rhs: u64)
fn mul_assign(&mut self, rhs: u64)
*= operation. Read moreSource§impl MulDiv<u64> for Bytes
impl MulDiv<u64> for Bytes
Source§fn mul_div_floor(self, num: u64, denom: u64) -> Option<Self>
fn mul_div_floor(self, num: u64, denom: u64) -> Option<Self>
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: u64, denom: u64) -> Option<Self>
fn mul_div_round(self, num: u64, denom: u64) -> Option<Self>
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 Bytes
impl OptionCheckedAdd for Bytes
Source§impl OptionCheckedDiv<u64> for Bytes
impl OptionCheckedDiv<u64> for Bytes
Source§impl OptionCheckedDiv for Bytes
impl OptionCheckedDiv for Bytes
Source§impl OptionCheckedMul<Bytes> for u64
impl OptionCheckedMul<Bytes> for u64
Source§impl OptionCheckedMul<u64> for Bytes
impl OptionCheckedMul<u64> for Bytes
Source§impl OptionCheckedRem<u64> for Bytes
impl OptionCheckedRem<u64> for Bytes
Source§impl OptionCheckedRem for Bytes
impl OptionCheckedRem for Bytes
Source§impl OptionCheckedSub for Bytes
impl OptionCheckedSub for Bytes
Source§impl OptionOverflowingAdd for Bytes
impl OptionOverflowingAdd for Bytes
Source§impl OptionOverflowingMul<Bytes> for u64
impl OptionOverflowingMul<Bytes> for u64
Source§impl OptionOverflowingMul<u64> for Bytes
impl OptionOverflowingMul<u64> for Bytes
Source§impl OptionOverflowingSub for Bytes
impl OptionOverflowingSub for Bytes
Source§impl OptionSaturatingAdd for Bytes
impl OptionSaturatingAdd for Bytes
Source§impl OptionSaturatingMul<Bytes> for u64
impl OptionSaturatingMul<Bytes> for u64
Source§impl OptionSaturatingMul<u64> for Bytes
impl OptionSaturatingMul<u64> for Bytes
Source§impl OptionSaturatingSub for Bytes
impl OptionSaturatingSub for Bytes
Source§impl OptionWrappingAdd for Bytes
impl OptionWrappingAdd for Bytes
Source§impl OptionWrappingMul<Bytes> for u64
impl OptionWrappingMul<Bytes> for u64
Source§impl OptionWrappingMul<u64> for Bytes
impl OptionWrappingMul<u64> for Bytes
Source§impl OptionWrappingSub for Bytes
impl OptionWrappingSub for Bytes
Source§impl Ord for Bytes
impl Ord for Bytes
Source§impl PartialOrd<Bytes> for Signed<Bytes>
impl PartialOrd<Bytes> for Signed<Bytes>
Source§impl PartialOrd<Signed<Bytes>> for Bytes
impl PartialOrd<Signed<Bytes>> for Bytes
Source§impl PartialOrd for Bytes
impl PartialOrd for Bytes
Source§impl RemAssign<u64> for Bytes
impl RemAssign<u64> for Bytes
Source§fn rem_assign(&mut self, rhs: u64)
fn rem_assign(&mut self, rhs: u64)
%= operation. Read moreSource§impl SubAssign<Bytes> for Signed<Bytes>
impl SubAssign<Bytes> for Signed<Bytes>
Source§fn sub_assign(&mut self, other: Bytes)
fn sub_assign(&mut self, other: Bytes)
-= operation. Read moreSource§impl SubAssign for Bytes
impl SubAssign for Bytes
Source§fn sub_assign(&mut self, rhs: Bytes)
fn sub_assign(&mut self, rhs: Bytes)
-= operation. Read moreSource§impl TryFrom<u64> for Bytes
impl TryFrom<u64> for Bytes
Source§type Error = GlibNoneError
type Error = GlibNoneError
Source§impl TryFromGlib<i64> for Bytes
impl TryFromGlib<i64> for Bytes
type Error = GlibNoneError
unsafe fn try_from_glib(val: i64) -> Result<Self, GlibNoneError>
Source§impl UnsignedIntoSigned for Bytes
impl UnsignedIntoSigned for Bytes
type Signed = Signed<Bytes>
Source§fn into_positive(self) -> Self::Signed
fn into_positive(self) -> Self::Signed
self into a Signed::Positive.Source§fn into_negative(self) -> Self::Signed
fn into_negative(self) -> Self::Signed
self into a Signed::Negative.Source§fn into_signed(self, sign: i32) -> Self::Signed
fn into_signed(self, sign: i32) -> Self::Signed
self into a Signed matching the given sign.impl Copy for Bytes
impl Eq for Bytes
impl FormattedValueIntrinsic for Bytes
impl OptionOperations for Bytes
impl SignedIntrinsic for Bytes
impl SpecificFormattedValue for Bytes
impl SpecificFormattedValueIntrinsic for Bytes
impl StructuralPartialEq for Bytes
Auto Trait Implementations§
impl Freeze for Bytes
impl RefUnwindSafe for Bytes
impl Send for Bytes
impl Sync for Bytes
impl Unpin for Bytes
impl UnwindSafe for Bytes
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CompatibleFormattedValue<GenericFormattedValue> for Twhere
T: SpecificFormattedValue,
impl<T> CompatibleFormattedValue<GenericFormattedValue> for Twhere
T: SpecificFormattedValue,
type Original = T
Source§fn try_into_checked(
self,
other: GenericFormattedValue,
) -> Result<T, FormattedValueError>
fn try_into_checked( self, other: GenericFormattedValue, ) -> Result<T, FormattedValueError>
Source§fn try_into_checked_explicit(
self,
format: Format,
) -> Result<<T as CompatibleFormattedValue<GenericFormattedValue>>::Original, FormattedValueError>
fn try_into_checked_explicit( self, format: Format, ) -> Result<<T as CompatibleFormattedValue<GenericFormattedValue>>::Original, FormattedValueError>
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>
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>
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 more§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>,
§impl<T, Rhs> OptionAdd<Rhs> for Twhere
T: OptionOperations + Add<Rhs>,
impl<T, Rhs> OptionAdd<Rhs> for Twhere
T: OptionOperations + Add<Rhs>,
§impl<T, InnerRhs> OptionAddAssign<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionAddAssign<&Option<InnerRhs>, InnerRhs> for T
§fn opt_add_assign(&mut self, rhs: &Option<InnerRhs>)
fn opt_add_assign(&mut self, rhs: &Option<InnerRhs>)
§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>,
§fn opt_add_assign(&mut self, rhs: Option<InnerRhs>)
fn opt_add_assign(&mut self, rhs: Option<InnerRhs>)
§impl<T, Rhs> OptionAddAssign<Rhs> for Twhere
T: OptionOperations + AddAssign<Rhs>,
impl<T, Rhs> OptionAddAssign<Rhs> for Twhere
T: OptionOperations + AddAssign<Rhs>,
§fn opt_add_assign(&mut self, rhs: Rhs)
fn opt_add_assign(&mut self, rhs: Rhs)
§impl<T, InnerRhs> OptionCheckedAdd<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionCheckedAdd<&Option<InnerRhs>, InnerRhs> for T
§type Output = <T as OptionCheckedAdd<InnerRhs>>::Output
type Output = <T as OptionCheckedAdd<InnerRhs>>::Output
§fn opt_checked_add(
self,
rhs: &Option<InnerRhs>,
) -> Result<Option<<T as OptionCheckedAdd<&Option<InnerRhs>, InnerRhs>>::Output>, Error>
fn opt_checked_add( self, rhs: &Option<InnerRhs>, ) -> Result<Option<<T as OptionCheckedAdd<&Option<InnerRhs>, InnerRhs>>::Output>, Error>
§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>,
§type Output = <T as OptionCheckedAdd<InnerRhs>>::Output
type Output = <T as OptionCheckedAdd<InnerRhs>>::Output
§fn opt_checked_add(
self,
rhs: Option<InnerRhs>,
) -> Result<Option<<T as OptionCheckedAdd<Option<InnerRhs>, InnerRhs>>::Output>, Error>
fn opt_checked_add( self, rhs: Option<InnerRhs>, ) -> Result<Option<<T as OptionCheckedAdd<Option<InnerRhs>, InnerRhs>>::Output>, Error>
§impl<T, InnerRhs> OptionCheckedDiv<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionCheckedDiv<&Option<InnerRhs>, InnerRhs> for T
§type Output = <T as OptionCheckedDiv<InnerRhs>>::Output
type Output = <T as OptionCheckedDiv<InnerRhs>>::Output
§fn opt_checked_div(
self,
rhs: &Option<InnerRhs>,
) -> Result<Option<<T as OptionCheckedDiv<&Option<InnerRhs>, InnerRhs>>::Output>, Error>
fn opt_checked_div( self, rhs: &Option<InnerRhs>, ) -> Result<Option<<T as OptionCheckedDiv<&Option<InnerRhs>, InnerRhs>>::Output>, Error>
§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>,
§type Output = <T as OptionCheckedDiv<InnerRhs>>::Output
type Output = <T as OptionCheckedDiv<InnerRhs>>::Output
§fn opt_checked_div(
self,
rhs: Option<InnerRhs>,
) -> Result<Option<<T as OptionCheckedDiv<Option<InnerRhs>, InnerRhs>>::Output>, Error>
fn opt_checked_div( self, rhs: Option<InnerRhs>, ) -> Result<Option<<T as OptionCheckedDiv<Option<InnerRhs>, InnerRhs>>::Output>, Error>
§impl<T, InnerRhs> OptionCheckedMul<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionCheckedMul<&Option<InnerRhs>, InnerRhs> for T
§type Output = <T as OptionCheckedMul<InnerRhs>>::Output
type Output = <T as OptionCheckedMul<InnerRhs>>::Output
§fn opt_checked_mul(
self,
rhs: &Option<InnerRhs>,
) -> Result<Option<<T as OptionCheckedMul<&Option<InnerRhs>, InnerRhs>>::Output>, Error>
fn opt_checked_mul( self, rhs: &Option<InnerRhs>, ) -> Result<Option<<T as OptionCheckedMul<&Option<InnerRhs>, InnerRhs>>::Output>, Error>
§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>,
§type Output = <T as OptionCheckedMul<InnerRhs>>::Output
type Output = <T as OptionCheckedMul<InnerRhs>>::Output
§fn opt_checked_mul(
self,
rhs: Option<InnerRhs>,
) -> Result<Option<<T as OptionCheckedMul<Option<InnerRhs>, InnerRhs>>::Output>, Error>
fn opt_checked_mul( self, rhs: Option<InnerRhs>, ) -> Result<Option<<T as OptionCheckedMul<Option<InnerRhs>, InnerRhs>>::Output>, Error>
§impl<T, InnerRhs> OptionCheckedRem<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionCheckedRem<&Option<InnerRhs>, InnerRhs> for T
§type Output = <T as OptionCheckedRem<InnerRhs>>::Output
type Output = <T as OptionCheckedRem<InnerRhs>>::Output
§fn opt_checked_rem(
self,
rhs: &Option<InnerRhs>,
) -> Result<Option<<T as OptionCheckedRem<&Option<InnerRhs>, InnerRhs>>::Output>, Error>
fn opt_checked_rem( self, rhs: &Option<InnerRhs>, ) -> Result<Option<<T as OptionCheckedRem<&Option<InnerRhs>, InnerRhs>>::Output>, Error>
§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>,
§type Output = <T as OptionCheckedRem<InnerRhs>>::Output
type Output = <T as OptionCheckedRem<InnerRhs>>::Output
§fn opt_checked_rem(
self,
rhs: Option<InnerRhs>,
) -> Result<Option<<T as OptionCheckedRem<Option<InnerRhs>, InnerRhs>>::Output>, Error>
fn opt_checked_rem( self, rhs: Option<InnerRhs>, ) -> Result<Option<<T as OptionCheckedRem<Option<InnerRhs>, InnerRhs>>::Output>, Error>
§impl<T, InnerRhs> OptionCheckedSub<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionCheckedSub<&Option<InnerRhs>, InnerRhs> for T
§type Output = <T as OptionCheckedSub<InnerRhs>>::Output
type Output = <T as OptionCheckedSub<InnerRhs>>::Output
§fn opt_checked_sub(
self,
rhs: &Option<InnerRhs>,
) -> Result<Option<<T as OptionCheckedSub<&Option<InnerRhs>, InnerRhs>>::Output>, Error>
fn opt_checked_sub( self, rhs: &Option<InnerRhs>, ) -> Result<Option<<T as OptionCheckedSub<&Option<InnerRhs>, InnerRhs>>::Output>, Error>
§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>,
§type Output = <T as OptionCheckedSub<InnerRhs>>::Output
type Output = <T as OptionCheckedSub<InnerRhs>>::Output
§fn opt_checked_sub(
self,
rhs: Option<InnerRhs>,
) -> Result<Option<<T as OptionCheckedSub<Option<InnerRhs>, InnerRhs>>::Output>, Error>
fn opt_checked_sub( self, rhs: Option<InnerRhs>, ) -> Result<Option<<T as OptionCheckedSub<Option<InnerRhs>, InnerRhs>>::Output>, Error>
§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>,
§impl<T, Rhs> OptionDiv<Rhs> for Twhere
T: OptionOperations + Div<Rhs>,
impl<T, Rhs> OptionDiv<Rhs> for Twhere
T: OptionOperations + Div<Rhs>,
§impl<T, InnerRhs> OptionDivAssign<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionDivAssign<&Option<InnerRhs>, InnerRhs> for T
§fn opt_div_assign(&mut self, rhs: &Option<InnerRhs>)
fn opt_div_assign(&mut self, rhs: &Option<InnerRhs>)
§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>,
§fn opt_div_assign(&mut self, rhs: Option<InnerRhs>)
fn opt_div_assign(&mut self, rhs: Option<InnerRhs>)
§impl<T, Rhs> OptionDivAssign<Rhs> for Twhere
T: OptionOperations + DivAssign<Rhs>,
impl<T, Rhs> OptionDivAssign<Rhs> for Twhere
T: OptionOperations + DivAssign<Rhs>,
§fn opt_div_assign(&mut self, rhs: Rhs)
fn opt_div_assign(&mut self, rhs: Rhs)
§impl<T, Rhs> OptionEq<&Rhs, Rhs> for Twhere
T: OptionOperations + PartialEq<Rhs>,
impl<T, Rhs> OptionEq<&Rhs, Rhs> for Twhere
T: OptionOperations + PartialEq<Rhs>,
§impl<T> OptionMinMax<Option<T>, T> for T
impl<T> OptionMinMax<Option<T>, T> for T
§impl<T> OptionMinMax<T> for T
impl<T> OptionMinMax<T> for T
§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>,
§impl<T, Rhs> OptionMul<Rhs> for Twhere
T: OptionOperations + Mul<Rhs>,
impl<T, Rhs> OptionMul<Rhs> for Twhere
T: OptionOperations + Mul<Rhs>,
§impl<T, InnerRhs> OptionMulAssign<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionMulAssign<&Option<InnerRhs>, InnerRhs> for T
§fn opt_mul_assign(&mut self, rhs: &Option<InnerRhs>)
fn opt_mul_assign(&mut self, rhs: &Option<InnerRhs>)
§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>,
§fn opt_mul_assign(&mut self, rhs: Option<InnerRhs>)
fn opt_mul_assign(&mut self, rhs: Option<InnerRhs>)
§impl<T, Rhs> OptionMulAssign<Rhs> for Twhere
T: OptionOperations + MulAssign<Rhs>,
impl<T, Rhs> OptionMulAssign<Rhs> for Twhere
T: OptionOperations + MulAssign<Rhs>,
§fn opt_mul_assign(&mut self, rhs: Rhs)
fn opt_mul_assign(&mut self, rhs: Rhs)
§impl<T, InnerRhs> OptionOrd<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionOrd<&Option<InnerRhs>, InnerRhs> for T
§impl<T, Rhs> OptionOrd<&Rhs, Rhs> for Twhere
T: OptionOperations + PartialOrd<Rhs>,
impl<T, Rhs> OptionOrd<&Rhs, Rhs> for Twhere
T: OptionOperations + PartialOrd<Rhs>,
§impl<T, InnerRhs> OptionOrd<Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionOrd<Option<InnerRhs>, InnerRhs> for T
§impl<T, InnerRhs> OptionOverflowingAdd<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionOverflowingAdd<&Option<InnerRhs>, InnerRhs> for T
§type Output = <T as OptionOverflowingAdd<InnerRhs>>::Output
type Output = <T as OptionOverflowingAdd<InnerRhs>>::Output
§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)>
self is returned. Read more§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>,
§type Output = <T as OptionOverflowingAdd<InnerRhs>>::Output
type Output = <T as OptionOverflowingAdd<InnerRhs>>::Output
§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)>
self is returned. Read more§impl<T, InnerRhs> OptionOverflowingMul<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionOverflowingMul<&Option<InnerRhs>, InnerRhs> for T
§type Output = <T as OptionOverflowingMul<InnerRhs>>::Output
type Output = <T as OptionOverflowingMul<InnerRhs>>::Output
§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)>
self is returned. Read more§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>,
§type Output = <T as OptionOverflowingMul<InnerRhs>>::Output
type Output = <T as OptionOverflowingMul<InnerRhs>>::Output
§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)>
self is returned. Read more§impl<T, InnerRhs> OptionOverflowingSub<&Option<InnerRhs>, InnerRhs> for T
impl<T, InnerRhs> OptionOverflowingSub<&Option<InnerRhs>, InnerRhs> for T
§type Output = <T as OptionOverflowingSub<InnerRhs>>::Output
type Output = <T as OptionOverflowingSub<InnerRhs>>::Output
§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)>
self is returned. Read more§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>,
§type Output = <T as OptionOverflowingSub<InnerRhs>>::Output
type Output = <T as OptionOverflowingSub<InnerRhs>>::Output
§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)>
self is returned. Read more