Trait rug::ops::Pow [−][src]
Expand description
The power operation.
Examples
use rug::ops::Pow; struct U(u32); impl Pow<u16> for U { type Output = u32; fn pow(self, rhs: u16) -> u32 { self.0.pow(u32::from(rhs)) } } let u = U(5); assert_eq!(u.pow(2_u16), 25);