[][src]Trait rug::ops::Pow

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.

Loading content...

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);
Loading content...

Implementations on Foreign Types

impl Pow<u32> for i8[src]

type Output = i8

impl<'_> Pow<u32> for &'_ i8[src]

type Output = i8

impl<'_> Pow<&'_ u32> for i8[src]

type Output = i8

impl<'_, '_> Pow<&'_ u32> for &'_ i8[src]

type Output = i8

impl Pow<u32> for i16[src]

type Output = i16

impl<'_> Pow<u32> for &'_ i16[src]

type Output = i16

impl<'_> Pow<&'_ u32> for i16[src]

type Output = i16

impl<'_, '_> Pow<&'_ u32> for &'_ i16[src]

type Output = i16

impl Pow<u32> for i32[src]

type Output = i32

impl<'_> Pow<u32> for &'_ i32[src]

type Output = i32

impl<'_> Pow<&'_ u32> for i32[src]

type Output = i32

impl<'_, '_> Pow<&'_ u32> for &'_ i32[src]

type Output = i32

impl Pow<u32> for i64[src]

type Output = i64

impl<'_> Pow<u32> for &'_ i64[src]

type Output = i64

impl<'_> Pow<&'_ u32> for i64[src]

type Output = i64

impl<'_, '_> Pow<&'_ u32> for &'_ i64[src]

type Output = i64

impl Pow<u32> for i128[src]

type Output = i128

impl<'_> Pow<u32> for &'_ i128[src]

type Output = i128

impl<'_> Pow<&'_ u32> for i128[src]

type Output = i128

impl<'_, '_> Pow<&'_ u32> for &'_ i128[src]

type Output = i128

impl Pow<u32> for isize[src]

type Output = isize

impl<'_> Pow<u32> for &'_ isize[src]

type Output = isize

impl<'_> Pow<&'_ u32> for isize[src]

type Output = isize

impl<'_, '_> Pow<&'_ u32> for &'_ isize[src]

type Output = isize

impl Pow<u32> for u8[src]

type Output = u8

impl<'_> Pow<u32> for &'_ u8[src]

type Output = u8

impl<'_> Pow<&'_ u32> for u8[src]

type Output = u8

impl<'_, '_> Pow<&'_ u32> for &'_ u8[src]

type Output = u8

impl Pow<u32> for u16[src]

type Output = u16

impl<'_> Pow<u32> for &'_ u16[src]

type Output = u16

impl<'_> Pow<&'_ u32> for u16[src]

type Output = u16

impl<'_, '_> Pow<&'_ u32> for &'_ u16[src]

type Output = u16

impl Pow<u32> for u32[src]

type Output = u32

impl<'_> Pow<u32> for &'_ u32[src]

type Output = u32

impl<'_> Pow<&'_ u32> for u32[src]

type Output = u32

impl<'_, '_> Pow<&'_ u32> for &'_ u32[src]

type Output = u32

impl Pow<u32> for u64[src]

type Output = u64

impl<'_> Pow<u32> for &'_ u64[src]

type Output = u64

impl<'_> Pow<&'_ u32> for u64[src]

type Output = u64

impl<'_, '_> Pow<&'_ u32> for &'_ u64[src]

type Output = u64

impl Pow<u32> for u128[src]

type Output = u128

impl<'_> Pow<u32> for &'_ u128[src]

type Output = u128

impl<'_> Pow<&'_ u32> for u128[src]

type Output = u128

impl<'_, '_> Pow<&'_ u32> for &'_ u128[src]

type Output = u128

impl Pow<u32> for usize[src]

type Output = usize

impl<'_> Pow<u32> for &'_ usize[src]

type Output = usize

impl<'_> Pow<&'_ u32> for usize[src]

type Output = usize

impl<'_, '_> Pow<&'_ u32> for &'_ usize[src]

type Output = usize

impl Pow<i32> for f32[src]

type Output = f32

impl<'_> Pow<i32> for &'_ f32[src]

type Output = f32

impl<'_> Pow<&'_ i32> for f32[src]

type Output = f32

impl<'_, '_> Pow<&'_ i32> for &'_ f32[src]

type Output = f32

impl Pow<f32> for f32[src]

type Output = f32

impl<'_> Pow<f32> for &'_ f32[src]

type Output = f32

impl<'_> Pow<&'_ f32> for f32[src]

type Output = f32

impl<'_, '_> Pow<&'_ f32> for &'_ f32[src]

type Output = f32

impl Pow<i32> for f64[src]

type Output = f64

impl<'_> Pow<i32> for &'_ f64[src]

type Output = f64

impl<'_> Pow<&'_ i32> for f64[src]

type Output = f64

impl<'_, '_> Pow<&'_ i32> for &'_ f64[src]

type Output = f64

impl Pow<f64> for f64[src]

type Output = f64

impl<'_> Pow<f64> for &'_ f64[src]

type Output = f64

impl<'_> Pow<&'_ f64> for f64[src]

type Output = f64

impl<'_, '_> Pow<&'_ f64> for &'_ f64[src]

type Output = f64

impl Pow<Float> for u32[src]

type Output = Float

impl<'b> Pow<&'b Float> for u32[src]

type Output = PowFromU32Incomplete<'b>

impl<'_> Pow<Float> for &'_ u32[src]

type Output = Float

impl<'b, '_> Pow<&'b Float> for &'_ u32[src]

type Output = PowFromU32Incomplete<'b>

impl Pow<Float> for i32[src]

type Output = Float

impl<'b> Pow<&'b Float> for i32[src]

type Output = PowFromI32Incomplete<'b>

impl<'_> Pow<Float> for &'_ i32[src]

type Output = Float

impl<'b, '_> Pow<&'b Float> for &'_ i32[src]

type Output = PowFromI32Incomplete<'b>

impl Pow<Float> for f64[src]

type Output = Float

impl<'b> Pow<&'b Float> for f64[src]

type Output = PowFromF64Incomplete<'b>

impl<'_> Pow<Float> for &'_ f64[src]

type Output = Float

impl<'b, '_> Pow<&'b Float> for &'_ f64[src]

type Output = PowFromF64Incomplete<'b>

impl Pow<Float> for f32[src]

type Output = Float

impl<'b> Pow<&'b Float> for f32[src]

type Output = PowFromF32Incomplete<'b>

impl<'_> Pow<Float> for &'_ f32[src]

type Output = Float

impl<'b, '_> Pow<&'b Float> for &'_ f32[src]

type Output = PowFromF32Incomplete<'b>

Loading content...

Implementors

impl Pow<f32> for Float[src]

type Output = Float

impl Pow<f32> for Complex[src]

type Output = Complex

impl Pow<f64> for Float[src]

type Output = Float

impl Pow<f64> for Complex[src]

type Output = Complex

impl Pow<i32> for Rational[src]

type Output = Rational

impl Pow<i32> for Float[src]

type Output = Float

impl Pow<i32> for Complex[src]

type Output = Complex

impl Pow<u32> for Integer[src]

type Output = Integer

impl Pow<u32> for Rational[src]

type Output = Rational

impl Pow<u32> for Float[src]

type Output = Float

impl Pow<u32> for Complex[src]

type Output = Complex

impl Pow<Complex> for Complex[src]

type Output = Complex

impl Pow<Float> for Complex[src]

type Output = Complex

impl Pow<Float> for Float[src]

type Output = Float

impl Pow<Integer> for Complex[src]

type Output = Complex

impl Pow<Integer> for Float[src]

type Output = Float

impl<'_> Pow<&'_ f32> for Float[src]

type Output = Float

impl<'_> Pow<&'_ f32> for Complex[src]

type Output = Complex

impl<'_> Pow<&'_ f64> for Float[src]

type Output = Float

impl<'_> Pow<&'_ f64> for Complex[src]

type Output = Complex

impl<'_> Pow<&'_ i32> for Rational[src]

type Output = Rational

impl<'_> Pow<&'_ i32> for Float[src]

type Output = Float

impl<'_> Pow<&'_ i32> for Complex[src]

type Output = Complex

impl<'_> Pow<&'_ u32> for Integer[src]

type Output = Integer

impl<'_> Pow<&'_ u32> for Rational[src]

type Output = Rational

impl<'_> Pow<&'_ u32> for Float[src]

type Output = Float

impl<'_> Pow<&'_ u32> for Complex[src]

type Output = Complex

impl<'_> Pow<&'_ Complex> for Complex[src]

type Output = Complex

impl<'_> Pow<&'_ Float> for Complex[src]

type Output = Complex

impl<'_> Pow<&'_ Float> for Float[src]

type Output = Float

impl<'_> Pow<&'_ Integer> for Complex[src]

type Output = Complex

impl<'_> Pow<&'_ Integer> for Float[src]

type Output = Float

impl<'_> Pow<Complex> for &'_ Complex[src]

type Output = Complex

impl<'_> Pow<Float> for &'_ Float[src]

type Output = Float

impl<'a> Pow<&'a Complex> for &'a Complex[src]

type Output = PowIncomplete<'a>

impl<'a> Pow<&'a Float> for &'a Complex[src]

type Output = PowFloatIncomplete<'a>

impl<'a> Pow<&'a Float> for &'a Float[src]

type Output = PowIncomplete<'a>

impl<'a> Pow<&'a Integer> for &'a Complex[src]

type Output = PowIntegerIncomplete<'a>

impl<'a> Pow<&'a Integer> for &'a Float[src]

type Output = PowIntegerIncomplete<'a>

impl<'a> Pow<Float> for &'a Complex[src]

type Output = PowOwnedFloatIncomplete<'a>

impl<'a> Pow<Integer> for &'a Complex[src]

type Output = PowOwnedIntegerIncomplete<'a>

impl<'a> Pow<Integer> for &'a Float[src]

type Output = PowOwnedIntegerIncomplete<'a>

impl<'b> Pow<f32> for &'b Float[src]

type Output = PowF32Incomplete<'b>

impl<'b> Pow<f32> for &'b Complex[src]

type Output = PowF32Incomplete<'b>

impl<'b> Pow<f64> for &'b Float[src]

type Output = PowF64Incomplete<'b>

impl<'b> Pow<f64> for &'b Complex[src]

type Output = PowF64Incomplete<'b>

impl<'b> Pow<i32> for &'b Rational[src]

type Output = PowI32Incomplete<'b>

impl<'b> Pow<i32> for &'b Float[src]

type Output = PowI32Incomplete<'b>

impl<'b> Pow<i32> for &'b Complex[src]

type Output = PowI32Incomplete<'b>

impl<'b> Pow<u32> for &'b Integer[src]

type Output = PowU32Incomplete<'b>

impl<'b> Pow<u32> for &'b Rational[src]

type Output = PowU32Incomplete<'b>

impl<'b> Pow<u32> for &'b Float[src]

type Output = PowU32Incomplete<'b>

impl<'b> Pow<u32> for &'b Complex[src]

type Output = PowU32Incomplete<'b>

impl<'b, '_> Pow<&'_ f32> for &'b Float[src]

type Output = PowF32Incomplete<'b>

impl<'b, '_> Pow<&'_ f32> for &'b Complex[src]

type Output = PowF32Incomplete<'b>

impl<'b, '_> Pow<&'_ f64> for &'b Float[src]

type Output = PowF64Incomplete<'b>

impl<'b, '_> Pow<&'_ f64> for &'b Complex[src]

type Output = PowF64Incomplete<'b>

impl<'b, '_> Pow<&'_ i32> for &'b Rational[src]

type Output = PowI32Incomplete<'b>

impl<'b, '_> Pow<&'_ i32> for &'b Float[src]

type Output = PowI32Incomplete<'b>

impl<'b, '_> Pow<&'_ i32> for &'b Complex[src]

type Output = PowI32Incomplete<'b>

impl<'b, '_> Pow<&'_ u32> for &'b Integer[src]

type Output = PowU32Incomplete<'b>

impl<'b, '_> Pow<&'_ u32> for &'b Rational[src]

type Output = PowU32Incomplete<'b>

impl<'b, '_> Pow<&'_ u32> for &'b Float[src]

type Output = PowU32Incomplete<'b>

impl<'b, '_> Pow<&'_ u32> for &'b Complex[src]

type Output = PowU32Incomplete<'b>

Loading content...