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(u32::from(rhs))
    }
}
let u = U(5);
assert_eq!(u.pow(2_u16), 25);

Associated Types

type Output[src]

The resulting type after the power operation.

Loading content...

Required methods

fn pow(self, rhs: Rhs) -> Self::Output[src]

Performs the power operation.

Examples

use rug::{ops::Pow, Integer};
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 i8[src]

type Output = Float

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

type Output = PowFromI8Incomplete<'b>

impl Pow<Float> for &i8[src]

type Output = Float

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

type Output = PowFromI8Incomplete<'b>

impl Pow<Float> for i16[src]

type Output = Float

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

type Output = PowFromI16Incomplete<'b>

impl Pow<Float> for &i16[src]

type Output = Float

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

type Output = PowFromI16Incomplete<'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 i64[src]

type Output = Float

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

type Output = PowFromI64Incomplete<'b>

impl Pow<Float> for &i64[src]

type Output = Float

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

type Output = PowFromI64Incomplete<'b>

impl Pow<Float> for i128[src]

type Output = Float

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

type Output = PowFromI128Incomplete<'b>

impl Pow<Float> for &i128[src]

type Output = Float

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

type Output = PowFromI128Incomplete<'b>

impl Pow<Float> for u8[src]

type Output = Float

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

type Output = PowFromU8Incomplete<'b>

impl Pow<Float> for &u8[src]

type Output = Float

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

type Output = PowFromU8Incomplete<'b>

impl Pow<Float> for u16[src]

type Output = Float

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

type Output = PowFromU16Incomplete<'b>

impl Pow<Float> for &u16[src]

type Output = Float

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

type Output = PowFromU16Incomplete<'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 &u32[src]

type Output = Float

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

type Output = PowFromU32Incomplete<'b>

impl Pow<Float> for u64[src]

type Output = Float

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

type Output = PowFromU64Incomplete<'b>

impl Pow<Float> for &u64[src]

type Output = Float

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

type Output = PowFromU64Incomplete<'b>

impl Pow<Float> for u128[src]

type Output = Float

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

type Output = PowFromU128Incomplete<'b>

impl Pow<Float> for &u128[src]

type Output = Float

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

type Output = PowFromU128Incomplete<'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>

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>

Loading content...

Implementors

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

type Output = Float

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

type Output = Float

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

type Output = Float

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

type Output = Float

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

type Output = Float

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

type Output = Float

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

type Output = Float

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

type Output = Float

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

type Output = Float

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

type Output = Float

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

type Output = Integer

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

type Output = Float

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

type Output = Float

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

type Output = Float

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

type Output = Float

impl Pow<f32> for Float[src]

type Output = Float

impl Pow<f64> for Float[src]

type Output = Float

impl Pow<i8> for Float[src]

type Output = Float

impl Pow<i16> for Float[src]

type Output = Float

impl Pow<i32> for Float[src]

type Output = Float

impl Pow<i64> for Float[src]

type Output = Float

impl Pow<i128> for Float[src]

type Output = Float

impl Pow<u8> for Float[src]

type Output = Float

impl Pow<u16> for Float[src]

type Output = Float

impl Pow<u32> for Float[src]

type Output = Float

impl Pow<u32> for Integer[src]

type Output = Integer

impl Pow<u64> for Float[src]

type Output = Float

impl Pow<u128> for Float[src]

type Output = Float

impl Pow<Float> for &Float[src]

type Output = Float

impl Pow<Float> for Float[src]

type Output = Float

impl Pow<Integer> for Float[src]

type Output = Float

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

type Output = PowIncomplete<'a>

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

type Output = PowIntegerIncomplete<'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<&'_ f64> for &'b Float[src]

type Output = PowF64Incomplete<'b>

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

type Output = PowI8Incomplete<'b>

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

type Output = PowI16Incomplete<'b>

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

type Output = PowI32Incomplete<'b>

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

type Output = PowI64Incomplete<'b>

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

type Output = PowI128Incomplete<'b>

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

type Output = PowU8Incomplete<'b>

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

type Output = PowU16Incomplete<'b>

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

type Output = PowU32Incomplete<'b>

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

type Output = PowU32Incomplete<'b>

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

type Output = PowU64Incomplete<'b>

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

type Output = PowU128Incomplete<'b>

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

type Output = PowF32Incomplete<'b>

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

type Output = PowF64Incomplete<'b>

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

type Output = PowI8Incomplete<'b>

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

type Output = PowI16Incomplete<'b>

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

type Output = PowI32Incomplete<'b>

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

type Output = PowI64Incomplete<'b>

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

type Output = PowI128Incomplete<'b>

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

type Output = PowU8Incomplete<'b>

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

type Output = PowU16Incomplete<'b>

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

type Output = PowU32Incomplete<'b>

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

type Output = PowU32Incomplete<'b>

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

type Output = PowU64Incomplete<'b>

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

type Output = PowU128Incomplete<'b>

Loading content...