Trait rug::ops::Pow
[−]
[src]
pub trait Pow<Rhs> {
type Output;
fn pow(self, rhs: Rhs) -> Self::Output;
}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(rhs as u32) } } let u = U(5); assert_eq!(u.pow(2_u16), 25);
Associated Types
type Output
The resulting type after the power operation.
Required Methods
fn pow(self, rhs: Rhs) -> Self::Output
Performs the power operation.
Examples
use rug::Integer; use rug::ops::Pow; let base = Integer::from(10); let power = base.pow(5); assert_eq!(power, 100_000);
Implementations on Foreign Types
impl Pow<u32> for i8[src]
impl<'a> Pow<u32> for &'a i8[src]
impl<'a> Pow<&'a u32> for i8[src]
impl<'a, 'b> Pow<&'a u32> for &'b i8[src]
impl Pow<u32> for i16[src]
impl<'a> Pow<u32> for &'a i16[src]
impl<'a> Pow<&'a u32> for i16[src]
impl<'a, 'b> Pow<&'a u32> for &'b i16[src]
impl Pow<u32> for i32[src]
impl<'a> Pow<u32> for &'a i32[src]
impl<'a> Pow<&'a u32> for i32[src]
impl<'a, 'b> Pow<&'a u32> for &'b i32[src]
impl Pow<u32> for i64[src]
impl<'a> Pow<u32> for &'a i64[src]
impl<'a> Pow<&'a u32> for i64[src]
impl<'a, 'b> Pow<&'a u32> for &'b i64[src]
impl Pow<u32> for isize[src]
impl<'a> Pow<u32> for &'a isize[src]
impl<'a> Pow<&'a u32> for isize[src]
impl<'a, 'b> Pow<&'a u32> for &'b isize[src]
impl Pow<u32> for i128[src]
impl<'a> Pow<u32> for &'a i128[src]
impl<'a> Pow<&'a u32> for i128[src]
impl<'a, 'b> Pow<&'a u32> for &'b i128[src]
impl Pow<u32> for u8[src]
impl<'a> Pow<u32> for &'a u8[src]
impl<'a> Pow<&'a u32> for u8[src]
impl<'a, 'b> Pow<&'a u32> for &'b u8[src]
impl Pow<u32> for u16[src]
impl<'a> Pow<u32> for &'a u16[src]
impl<'a> Pow<&'a u32> for u16[src]
impl<'a, 'b> Pow<&'a u32> for &'b u16[src]
impl Pow<u32> for u32[src]
impl<'a> Pow<u32> for &'a u32[src]
impl<'a> Pow<&'a u32> for u32[src]
impl<'a, 'b> Pow<&'a u32> for &'b u32[src]
impl Pow<u32> for u64[src]
impl<'a> Pow<u32> for &'a u64[src]
impl<'a> Pow<&'a u32> for u64[src]
impl<'a, 'b> Pow<&'a u32> for &'b u64[src]
impl Pow<u32> for usize[src]
impl<'a> Pow<u32> for &'a usize[src]
impl<'a> Pow<&'a u32> for usize[src]
impl<'a, 'b> Pow<&'a u32> for &'b usize[src]
impl Pow<u32> for u128[src]
impl<'a> Pow<u32> for &'a u128[src]
impl<'a> Pow<&'a u32> for u128[src]
impl<'a, 'b> Pow<&'a u32> for &'b u128[src]
impl Pow<i32> for f32[src]
impl<'a> Pow<i32> for &'a f32[src]
impl<'a> Pow<&'a i32> for f32[src]
impl<'a, 'b> Pow<&'a i32> for &'b f32[src]
impl Pow<f32> for f32[src]
impl<'a> Pow<f32> for &'a f32[src]
impl<'a> Pow<&'a f32> for f32[src]
impl<'a, 'b> Pow<&'a f32> for &'b f32[src]
impl Pow<i32> for f64[src]
impl<'a> Pow<i32> for &'a f64[src]
impl<'a> Pow<&'a i32> for f64[src]
impl<'a, 'b> Pow<&'a i32> for &'b f64[src]
impl Pow<f64> for f64[src]
impl<'a> Pow<f64> for &'a f64[src]
impl<'a> Pow<&'a f64> for f64[src]
impl<'a, 'b> Pow<&'a f64> for &'b f64[src]
impl Pow<Float> for u32[src]
impl<'b> Pow<&'b Float> for u32[src]
impl<'t> Pow<Float> for &'t u32[src]
impl<'b, 't> Pow<&'b Float> for &'t u32[src]
impl Pow<Float> for i32[src]
impl<'b> Pow<&'b Float> for i32[src]
impl<'t> Pow<Float> for &'t i32[src]
impl<'b, 't> Pow<&'b Float> for &'t i32[src]
impl Pow<Float> for f64[src]
impl<'b> Pow<&'b Float> for f64[src]
impl<'t> Pow<Float> for &'t f64[src]
impl<'b, 't> Pow<&'b Float> for &'t f64[src]
impl Pow<Float> for f32[src]
impl<'b> Pow<&'b Float> for f32[src]
impl<'t> Pow<Float> for &'t f32[src]
impl<'b, 't> Pow<&'b Float> for &'t f32[src]
Implementors
impl Pow<u32> for Integer type Output = Integer;impl<'t> Pow<&'t u32> for Integer type Output = Integer;impl<'b> Pow<u32> for &'b Integer type Output = PowU32Incomplete<'b>;impl<'t, 'b> Pow<&'t u32> for &'b Integer type Output = PowU32Incomplete<'b>;impl Pow<i32> for Rational type Output = Rational;impl<'t> Pow<&'t i32> for Rational type Output = Rational;impl<'b> Pow<i32> for &'b Rational type Output = PowI32Incomplete<'b>;impl<'t, 'b> Pow<&'t i32> for &'b Rational type Output = PowI32Incomplete<'b>;impl Pow<u32> for Rational type Output = Rational;impl<'t> Pow<&'t u32> for Rational type Output = Rational;impl<'b> Pow<u32> for &'b Rational type Output = PowU32Incomplete<'b>;impl<'t, 'b> Pow<&'t u32> for &'b Rational type Output = PowU32Incomplete<'b>;impl Pow<Float> for Float type Output = Float;impl<'a> Pow<&'a Float> for Float type Output = Float;impl<'a> Pow<&'a Float> for &'a Float type Output = PowIncomplete<'a>;impl<'a> Pow<Float> for &'a Float type Output = Float;impl Pow<Integer> for Float type Output = Float;impl<'a> Pow<&'a Integer> for Float type Output = Float;impl<'a> Pow<&'a Integer> for &'a Float type Output = PowIntegerIncomplete<'a>;impl<'a> Pow<Integer> for &'a Float type Output = PowOwnedIntegerIncomplete<'a>;impl Pow<u32> for Float type Output = Float;impl<'t> Pow<&'t u32> for Float type Output = Float;impl<'b> Pow<u32> for &'b Float type Output = PowU32Incomplete<'b>;impl<'t, 'b> Pow<&'t u32> for &'b Float type Output = PowU32Incomplete<'b>;impl Pow<i32> for Float type Output = Float;impl<'t> Pow<&'t i32> for Float type Output = Float;impl<'b> Pow<i32> for &'b Float type Output = PowI32Incomplete<'b>;impl<'t, 'b> Pow<&'t i32> for &'b Float type Output = PowI32Incomplete<'b>;impl Pow<f64> for Float type Output = Float;impl<'t> Pow<&'t f64> for Float type Output = Float;impl<'b> Pow<f64> for &'b Float type Output = PowF64Incomplete<'b>;impl<'t, 'b> Pow<&'t f64> for &'b Float type Output = PowF64Incomplete<'b>;impl Pow<f32> for Float type Output = Float;impl<'t> Pow<&'t f32> for Float type Output = Float;impl<'b> Pow<f32> for &'b Float type Output = PowF32Incomplete<'b>;impl<'t, 'b> Pow<&'t f32> for &'b Float type Output = PowF32Incomplete<'b>;impl Pow<Complex> for Complex type Output = Complex;impl<'a> Pow<&'a Complex> for Complex type Output = Complex;impl<'a> Pow<&'a Complex> for &'a Complex type Output = PowIncomplete<'a>;impl<'a> Pow<Complex> for &'a Complex type Output = Complex;impl Pow<Float> for Complex type Output = Complex;impl<'a> Pow<&'a Float> for Complex type Output = Complex;impl<'a> Pow<&'a Float> for &'a Complex type Output = PowFloatIncomplete<'a>;impl<'a> Pow<Float> for &'a Complex type Output = PowOwnedFloatIncomplete<'a>;impl Pow<Integer> for Complex type Output = Complex;impl<'a> Pow<&'a Integer> for Complex type Output = Complex;impl<'a> Pow<&'a Integer> for &'a Complex type Output = PowIntegerIncomplete<'a>;impl<'a> Pow<Integer> for &'a Complex type Output = PowOwnedIntegerIncomplete<'a>;impl Pow<u32> for Complex type Output = Complex;impl<'t> Pow<&'t u32> for Complex type Output = Complex;impl<'b> Pow<u32> for &'b Complex type Output = PowU32Incomplete<'b>;impl<'t, 'b> Pow<&'t u32> for &'b Complex type Output = PowU32Incomplete<'b>;impl Pow<i32> for Complex type Output = Complex;impl<'t> Pow<&'t i32> for Complex type Output = Complex;impl<'b> Pow<i32> for &'b Complex type Output = PowI32Incomplete<'b>;impl<'t, 'b> Pow<&'t i32> for &'b Complex type Output = PowI32Incomplete<'b>;impl Pow<f64> for Complex type Output = Complex;impl<'t> Pow<&'t f64> for Complex type Output = Complex;impl<'b> Pow<f64> for &'b Complex type Output = PowF64Incomplete<'b>;impl<'t, 'b> Pow<&'t f64> for &'b Complex type Output = PowF64Incomplete<'b>;impl Pow<f32> for Complex type Output = Complex;impl<'t> Pow<&'t f32> for Complex type Output = Complex;impl<'b> Pow<f32> for &'b Complex type Output = PowF32Incomplete<'b>;impl<'t, 'b> Pow<&'t f32> for &'b Complex type Output = PowF32Incomplete<'b>;