Trait rugint::SubFromAssign [] [src]

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

Subtract and assigns the result to the rhs operand.

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

Examples

use rugint::{Integer, SubFromAssign};
let mut rhs = Integer::from(10);
rhs.sub_from_assign(100);
// rhs = 100 - 10
assert!(rhs == 90);

Required Methods

Peforms the subtraction.

Implementors