Trait rug::ops::PowAssign [−][src]
Compound power operation and assignment.
Examples
use rug::ops::PowAssign; struct U(u32); impl PowAssign<u16> for U { fn pow_assign(&mut self, rhs: u16) { self.0 = self.0.pow(u32::from(rhs)); } } let mut u = U(5); u.pow_assign(2_u16); assert_eq!(u.0, 25);
Required methods
fn pow_assign(&mut self, rhs: Rhs)
[src]
Peforms the power operation.
Examples
use rug::{ops::PowAssign, Integer}; let mut i = Integer::from(10); i.pow_assign(5); assert_eq!(i, 100_000);