Trait std::ops::MulAssign
pub trait MulAssign<Rhs = Self> { fn mul_assign(&mut self, rhs: Rhs); }
The multiplication assignment operator *=
.
Examples
use std::ops::MulAssign; #[derive(Debug, PartialEq)] struct Frequency { hertz: f64 } impl MulAssign<f64> for Frequency { fn mul_assign(&mut self, rhs: f64) { self.hertz *= rhs; } } let mut frequency = Frequency { hertz: 50.0 }; frequency *= 4.0; assert_eq!(Frequency { hertz: 200.0 }, frequency);
Required methods
fn mul_assign(&mut self, rhs: Rhs)
Performs the *=
operation.
Example
let mut x: u32 = 12; x *= 2; assert_eq!(x, 24);
Implementors
impl MulAssign<f32> for f32
impl MulAssign<f64> for f64
impl MulAssign<i8> for i8
impl MulAssign<i16> for i16
impl MulAssign<i32> for i32
impl MulAssign<i64> for i64
impl MulAssign<i128> for i128
impl MulAssign<isize> for isize
impl MulAssign<u8> for u8
impl MulAssign<u16> for u16
impl MulAssign<u32> for u32
[src]1.9.0
impl MulAssign<u32> for Duration
impl MulAssign<u64> for u64
impl MulAssign<u128> for u128
impl MulAssign<usize> for usize
impl MulAssign<Saturating<i8>> for Saturating<i8>
impl MulAssign<Saturating<i16>> for Saturating<i16>
impl MulAssign<Saturating<i32>> for Saturating<i32>
impl MulAssign<Saturating<i64>> for Saturating<i64>
impl MulAssign<Saturating<i128>> for Saturating<i128>
impl MulAssign<Saturating<isize>> for Saturating<isize>
impl MulAssign<Saturating<u8>> for Saturating<u8>
impl MulAssign<Saturating<u16>> for Saturating<u16>
impl MulAssign<Saturating<u32>> for Saturating<u32>
impl MulAssign<Saturating<u64>> for Saturating<u64>
impl MulAssign<Saturating<u128>> for Saturating<u128>
impl MulAssign<Saturating<usize>> for Saturating<usize>
impl MulAssign<Wrapping<i8>> for Wrapping<i8>
impl MulAssign<Wrapping<i16>> for Wrapping<i16>
impl MulAssign<Wrapping<i32>> for Wrapping<i32>
impl MulAssign<Wrapping<i64>> for Wrapping<i64>
impl MulAssign<Wrapping<i128>> for Wrapping<i128>
impl MulAssign<Wrapping<isize>> for Wrapping<isize>
impl MulAssign<Wrapping<u8>> for Wrapping<u8>
impl MulAssign<Wrapping<u16>> for Wrapping<u16>
impl MulAssign<Wrapping<u32>> for Wrapping<u32>
impl MulAssign<Wrapping<u64>> for Wrapping<u64>
impl MulAssign<Wrapping<u128>> for Wrapping<u128>
impl MulAssign<Wrapping<usize>> for Wrapping<usize>
[src]1.22.0
impl<'_> MulAssign<&'_ f32> for f32
[src]1.22.0
impl<'_> MulAssign<&'_ f64> for f64
[src]1.22.0
impl<'_> MulAssign<&'_ i8> for i8
[src]1.22.0
impl<'_> MulAssign<&'_ i16> for i16
[src]1.22.0
impl<'_> MulAssign<&'_ i32> for i32
[src]1.22.0
impl<'_> MulAssign<&'_ i64> for i64
[src]1.22.0
impl<'_> MulAssign<&'_ i128> for i128
[src]1.22.0
impl<'_> MulAssign<&'_ isize> for isize
[src]1.22.0
impl<'_> MulAssign<&'_ u8> for u8
[src]1.22.0
impl<'_> MulAssign<&'_ u16> for u16
[src]1.22.0
impl<'_> MulAssign<&'_ u32> for u32
[src]1.22.0
impl<'_> MulAssign<&'_ u64> for u64
[src]1.22.0
impl<'_> MulAssign<&'_ u128> for u128
[src]1.22.0
impl<'_> MulAssign<&'_ usize> for usize
[src]1.22.0
impl<'_> MulAssign<&'_ Saturating<i8>> for Saturating<i8>
[src]1.22.0
impl<'_> MulAssign<&'_ Saturating<i16>> for Saturating<i16>
[src]1.22.0
impl<'_> MulAssign<&'_ Saturating<i32>> for Saturating<i32>
[src]1.22.0
impl<'_> MulAssign<&'_ Saturating<i64>> for Saturating<i64>
[src]1.22.0
impl<'_> MulAssign<&'_ Saturating<i128>> for Saturating<i128>
[src]1.22.0
impl<'_> MulAssign<&'_ Saturating<isize>> for Saturating<isize>
[src]1.22.0
impl<'_> MulAssign<&'_ Saturating<u8>> for Saturating<u8>
[src]1.22.0
impl<'_> MulAssign<&'_ Saturating<u16>> for Saturating<u16>
[src]1.22.0
impl<'_> MulAssign<&'_ Saturating<u32>> for Saturating<u32>
[src]1.22.0
impl<'_> MulAssign<&'_ Saturating<u64>> for Saturating<u64>
[src]1.22.0
impl<'_> MulAssign<&'_ Saturating<u128>> for Saturating<u128>
[src]1.22.0
impl<'_> MulAssign<&'_ Saturating<usize>> for Saturating<usize>
[src]1.22.0
impl<'_> MulAssign<&'_ Wrapping<i8>> for Wrapping<i8>
[src]1.22.0
impl<'_> MulAssign<&'_ Wrapping<i16>> for Wrapping<i16>
[src]1.22.0
impl<'_> MulAssign<&'_ Wrapping<i32>> for Wrapping<i32>
[src]1.22.0
impl<'_> MulAssign<&'_ Wrapping<i64>> for Wrapping<i64>
[src]1.22.0
impl<'_> MulAssign<&'_ Wrapping<i128>> for Wrapping<i128>
[src]1.22.0
impl<'_> MulAssign<&'_ Wrapping<isize>> for Wrapping<isize>
[src]1.22.0
impl<'_> MulAssign<&'_ Wrapping<u8>> for Wrapping<u8>
[src]1.22.0
impl<'_> MulAssign<&'_ Wrapping<u16>> for Wrapping<u16>
[src]1.22.0
impl<'_> MulAssign<&'_ Wrapping<u32>> for Wrapping<u32>
[src]1.22.0
impl<'_> MulAssign<&'_ Wrapping<u64>> for Wrapping<u64>
[src]1.22.0
impl<'_> MulAssign<&'_ Wrapping<u128>> for Wrapping<u128>
[src]1.22.0
impl<'_> MulAssign<&'_ Wrapping<usize>> for Wrapping<usize>
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/ops/trait.MulAssign.html