Trait rugint::RemFromAssign [] [src]

pub trait RemFromAssign<Lhs = Self> {
    fn rem_from_assign(&mut self, lhs: Lhs);
}

Compute the remainder and assign the result to the rhs operand.

rhs.rem_from_assign(lhs) has the same effect as rhs = lhs % rhs.

Examples

use rugint::{Integer, RemFromAssign};
let lhs = Integer::from(17);
let mut rhs = Integer::from(2);
rhs.rem_from_assign(&lhs);
// rhs = 17 / 2
assert!(rhs == 1);

Required Methods

Peforms the remainder operation.

Implementors