pub trait MulAssign<Rhs = Self> {
fn mul_assign(&mut self, rhs: Rhs);
}
Expand description
The multiplication assignment operator *=
.
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);
Performs the *=
operation.
let mut x: u32 = 12;
x *= 2;
assert_eq!(x, 24);
impl<'a, P> MulAssign<&'a Fp2<P>> for Fp2<P> where
P: Fp2Parameters,
impl<'a, P> MulAssign<&'a Fp6<P>> for Fp6<P> where
P: Fp6Parameters,
impl<'a, P> MulAssign<&'a Fp12<P>> for Fp12<P> where
P: Fp12Parameters,
impl<'a, P> MulAssign<&'a Fp256<P>> for Fp256<P> where
P: Fp256Parameters,
impl<'a, P> MulAssign<&'a Fp384<P>> for Fp384<P> where
P: Fp384Parameters,
impl<'a, P> MulAssign<&'a mut Fp2<P>> for Fp2<P> where
P: Fp2Parameters,
impl<'a, P> MulAssign<&'a mut Fp6<P>> for Fp6<P> where
P: Fp6Parameters,
impl<'a, P> MulAssign<&'a mut Fp12<P>> for Fp12<P> where
P: Fp12Parameters,
impl<'a, P> MulAssign<&'a mut Fp256<P>> for Fp256<P> where
P: Fp256Parameters,
impl<'a, P> MulAssign<&'a mut Fp384<P>> for Fp384<P> where
P: Fp384Parameters,
impl<E> MulAssign<&Field<E>> for Field<E> where
E: Environment,
impl<E> MulAssign<&Scalar<E>> for Group<E> where
E: Environment,
impl<E> MulAssign<&Scalar<E>> for Scalar<E> where
E: Environment,
impl<E> MulAssign<Field<E>> for Field<E> where
E: Environment,
impl<E> MulAssign<Scalar<E>> for Group<E> where
E: Environment,
impl<E> MulAssign<Scalar<E>> for Scalar<E> where
E: Environment,
impl<P> MulAssign<&&Fp2<P>> for Fp2<P> where
P: Fp2Parameters,
impl<P> MulAssign<&&Fp6<P>> for Fp6<P> where
P: Fp6Parameters,
impl<P> MulAssign<&&Fp12<P>> for Fp12<P> where
P: Fp12Parameters,
impl<P> MulAssign<&&Fp256<P>> for Fp256<P> where
P: Fp256Parameters,
impl<P> MulAssign<&&Fp384<P>> for Fp384<P> where
P: Fp384Parameters,
impl<P> MulAssign<<P as ModelParameters>::ScalarField> for Projective<P> where
P: ShortWeierstrassParameters,
impl<P> MulAssign<<P as ModelParameters>::ScalarField> for Projective<P> where
P: TwistedEdwardsParameters,
impl<P> MulAssign<Fp2<P>> for Fp2<P> where
P: Fp2Parameters,
impl<P> MulAssign<Fp6<P>> for Fp6<P> where
P: Fp6Parameters,
impl<P> MulAssign<Fp12<P>> for Fp12<P> where
P: Fp12Parameters,
impl<P> MulAssign<Fp256<P>> for Fp256<P> where
P: Fp256Parameters,
impl<P> MulAssign<Fp384<P>> for Fp384<P> where
P: Fp384Parameters,