Trait rug::ops::DivFromAssign [] [src]

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

Divide and assign the result to the rhs operand.

rhs.div_from_assign(lhs) has the same effect as rhs = lhs / rhs.

Required Methods

Peforms the division.

Examples

use rug::Integer;
use rug::ops::DivFromAssign;
let lhs = Integer::from(50);
let mut rhs = Integer::from(5);
rhs.div_from_assign(lhs);
// rhs = 50 / 5
assert_eq!(rhs, 10);

Implementors