Trait Pow
pub trait Pow<Exp>
A type operator that provides exponentiation by repeated squaring.
Example
use ;
assert_eq!;
Associated Types
type Output;The result of the exponentiation.
Required Methods
fn powi(self, exp: Exp) -> Self::OutputThis function isn't used in this crate, but may be useful for others. It is implemented for primitives.
Example
use ; let a = 7u32.powi; let b = 7u32.pow; assert_eq!; let x = 3.0.powi; let y = 27.0; assert_eq!;
Implementors
impl Pow<UTerm> for f32impl Pow<UTerm> for f64impl Pow<UTerm> for i16impl Pow<UTerm> for i32impl Pow<UTerm> for i64impl Pow<UTerm> for i8impl Pow<UTerm> for isizeimpl Pow<UTerm> for u16impl Pow<UTerm> for u32impl Pow<UTerm> for u64impl Pow<UTerm> for u8impl Pow<UTerm> for usizeimpl Pow<Z0> for Z0impl Pow<Z0> for f32impl Pow<Z0> for f64impl Pow<Z0> for i16impl Pow<Z0> for i32impl Pow<Z0> for i64impl Pow<Z0> for i8impl Pow<Z0> for isizeimpl Pow<Z0> for u16impl Pow<Z0> for u32impl Pow<Z0> for u64impl Pow<Z0> for u8impl Pow<Z0> for usizeimpl<U: Unsigned + NonZero> Pow<NInt<U>> for P1impl<U: Unsigned + NonZero> Pow<NInt<U>> for Z0impl<U: Unsigned + NonZero> Pow<NInt<U>> for f32impl<U: Unsigned + NonZero> Pow<NInt<U>> for f64impl<U: Unsigned + NonZero> Pow<PInt<U>> for Z0impl<U: Unsigned + NonZero> Pow<PInt<U>> for f32impl<U: Unsigned + NonZero> Pow<PInt<U>> for f64impl<U: Unsigned + NonZero> Pow<PInt<U>> for i16impl<U: Unsigned + NonZero> Pow<PInt<U>> for i32impl<U: Unsigned + NonZero> Pow<PInt<U>> for i64impl<U: Unsigned + NonZero> Pow<PInt<U>> for i8impl<U: Unsigned + NonZero> Pow<PInt<U>> for isizeimpl<U: Unsigned + NonZero> Pow<PInt<U>> for u16impl<U: Unsigned + NonZero> Pow<PInt<U>> for u32impl<U: Unsigned + NonZero> Pow<PInt<U>> for u64impl<U: Unsigned + NonZero> Pow<PInt<U>> for u8impl<U: Unsigned + NonZero> Pow<PInt<U>> for usizeimpl<U: Unsigned + NonZero> Pow<Z0> for NInt<U>impl<U: Unsigned + NonZero> Pow<Z0> for PInt<U>impl<U: Unsigned> Pow<NInt<UInt<U, B0>>> for N1impl<U: Unsigned> Pow<NInt<UInt<U, B1>>> for N1impl<U: Unsigned, B: Bit> Pow<UInt<U, B>> for f32impl<U: Unsigned, B: Bit> Pow<UInt<U, B>> for f64impl<U: Unsigned, B: Bit> Pow<UInt<U, B>> for i16impl<U: Unsigned, B: Bit> Pow<UInt<U, B>> for i32impl<U: Unsigned, B: Bit> Pow<UInt<U, B>> for i64impl<U: Unsigned, B: Bit> Pow<UInt<U, B>> for i8impl<U: Unsigned, B: Bit> Pow<UInt<U, B>> for isizeimpl<U: Unsigned, B: Bit> Pow<UInt<U, B>> for u16impl<U: Unsigned, B: Bit> Pow<UInt<U, B>> for u32impl<U: Unsigned, B: Bit> Pow<UInt<U, B>> for u64impl<U: Unsigned, B: Bit> Pow<UInt<U, B>> for u8impl<U: Unsigned, B: Bit> Pow<UInt<U, B>> for usizeimpl<Ul, Ur: Unsigned + NonZero> Pow<PInt<Ur>> for PInt<Ul> where Ul: Pow<Ur> + Unsigned + NonZero, <Ul as Pow<Ur>>::Output: Unsigned + NonZero,impl<Ul, Ur: Unsigned> Pow<PInt<UInt<Ur, B0>>> for NInt<Ul> where Ul: Pow<UInt<Ur, B0>> + Unsigned + NonZero, <Ul as Pow<UInt<Ur, B0>>>::Output: Unsigned + NonZero,impl<Ul, Ur: Unsigned> Pow<PInt<UInt<Ur, B1>>> for NInt<Ul> where Ul: Pow<UInt<Ur, B1>> + Unsigned + NonZero, <Ul as Pow<UInt<Ur, B1>>>::Output: Unsigned + NonZero,impl<X, N> Pow<N> for UInt<U, B> where X: Unsigned + PrivatePow<UInt<UTerm, B1>, N>, N: Unsigned,impl<X, N> Pow<N> for UTerm where X: Unsigned + PrivatePow<UInt<UTerm, B1>, N>, N: Unsigned,impl<X, N: Unsigned> Pow<N> for X where X: PrivatePow<U1, N> + Unsigned,