pub trait DivAssign<Rhs = Self> {
fn div_assign(&mut self, rhs: Rhs);
}
Expand description
The division assignment operator /=
.
use std::ops::DivAssign;
#[derive(Debug, PartialEq)]
struct Frequency { hertz: f64 }
impl DivAssign<f64> for Frequency {
fn div_assign(&mut self, rhs: f64) {
self.hertz /= rhs;
}
}
let mut frequency = Frequency { hertz: 200.0 };
frequency /= 4.0;
assert_eq!(Frequency { hertz: 50.0 }, frequency);
Performs the /=
operation.
let mut x: u32 = 12;
x /= 2;
assert_eq!(x, 6);
impl<'a, P> DivAssign<&'a Fp2<P>> for Fp2<P> where
P: Fp2Parameters,
impl<'a, P> DivAssign<&'a Fp6<P>> for Fp6<P> where
P: Fp6Parameters,
impl<'a, P> DivAssign<&'a Fp12<P>> for Fp12<P> where
P: Fp12Parameters,
impl<'a, P> DivAssign<&'a Fp256<P>> for Fp256<P> where
P: Fp256Parameters,
impl<'a, P> DivAssign<&'a Fp384<P>> for Fp384<P> where
P: Fp384Parameters,
impl<'a, P> DivAssign<&'a mut Fp2<P>> for Fp2<P> where
P: Fp2Parameters,
impl<'a, P> DivAssign<&'a mut Fp6<P>> for Fp6<P> where
P: Fp6Parameters,
impl<'a, P> DivAssign<&'a mut Fp12<P>> for Fp12<P> where
P: Fp12Parameters,
impl<'a, P> DivAssign<&'a mut Fp256<P>> for Fp256<P> where
P: Fp256Parameters,
impl<'a, P> DivAssign<&'a mut Fp384<P>> for Fp384<P> where
P: Fp384Parameters,
impl<E> DivAssign<&Field<E>> for Field<E> where
E: Environment,
impl<E> DivAssign<&Scalar<E>> for Scalar<E> where
E: Environment,
impl<E> DivAssign<Field<E>> for Field<E> where
E: Environment,
impl<E> DivAssign<Scalar<E>> for Scalar<E> where
E: Environment,
impl<P> DivAssign<&&Fp2<P>> for Fp2<P> where
P: Fp2Parameters,
impl<P> DivAssign<&&Fp6<P>> for Fp6<P> where
P: Fp6Parameters,
impl<P> DivAssign<&&Fp12<P>> for Fp12<P> where
P: Fp12Parameters,
impl<P> DivAssign<&&Fp256<P>> for Fp256<P> where
P: Fp256Parameters,
impl<P> DivAssign<&&Fp384<P>> for Fp384<P> where
P: Fp384Parameters,
impl<P> DivAssign<Fp2<P>> for Fp2<P> where
P: Fp2Parameters,
impl<P> DivAssign<Fp6<P>> for Fp6<P> where
P: Fp6Parameters,
impl<P> DivAssign<Fp12<P>> for Fp12<P> where
P: Fp12Parameters,
impl<P> DivAssign<Fp256<P>> for Fp256<P> where
P: Fp256Parameters,
impl<P> DivAssign<Fp384<P>> for Fp384<P> where
P: Fp384Parameters,