Trait rug::ops::PowAssign[][src]

pub trait PowAssign<Rhs> {
    fn pow_assign(&mut self, rhs: Rhs);
}

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

Implementations on Foreign Types

impl PowAssign<u32> for i8[src]

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

impl PowAssign<u32> for i16[src]

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

impl PowAssign<u32> for i32[src]

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

impl PowAssign<u32> for i64[src]

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

impl PowAssign<u32> for i128[src]

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

impl PowAssign<u32> for isize[src]

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

impl PowAssign<u32> for u8[src]

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

impl PowAssign<u32> for u16[src]

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

impl PowAssign<u32> for u32[src]

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

impl PowAssign<u32> for u64[src]

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

impl PowAssign<u32> for u128[src]

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

impl PowAssign<u32> for usize[src]

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

impl PowAssign<i32> for f32[src]

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

impl PowAssign<f32> for f32[src]

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

impl PowAssign<i32> for f64[src]

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

impl PowAssign<f64> for f64[src]

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

Loading content...

Implementors

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

impl PowAssign<f32> for Float[src]

impl PowAssign<f64> for Float[src]

impl PowAssign<i8> for Float[src]

impl PowAssign<i16> for Float[src]

impl PowAssign<i32> for Float[src]

impl PowAssign<i64> for Float[src]

impl PowAssign<i128> for Float[src]

impl PowAssign<u8> for Float[src]

impl PowAssign<u16> for Float[src]

impl PowAssign<u32> for Float[src]

impl PowAssign<u32> for Integer[src]

impl PowAssign<u64> for Float[src]

impl PowAssign<u128> for Float[src]

impl PowAssign<Float> for Float[src]

impl PowAssign<Integer> for Float[src]

Loading content...