Trait gmp_mpfr::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 gmp_mpfr::{Integer, SubFromAssign};
let mut i = Integer::from(10);
i.sub_from_assign(100);
// i = 100 - 10
assert!(i == 90);

Required Methods

Peforms the subtraction.

Implementors