Trait rug::ops::SubFromAssign [] [src]

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

Subtract and assigns the result to the rhs operand.

rhs.sub_from_assign(lhs) has the same effect as rhs = lhs - rhs.

Required Methods

Peforms the subtraction.

Examples

use rug::Integer;
use rug::ops::SubFromAssign;
let mut rhs = Integer::from(10);
rhs.sub_from_assign(100);
// rhs = 100 - 10
assert_eq!(rhs, 90);

Implementors