Trait modicum::PowMod

source ·
pub trait PowMod<M: Modulus<Self>, Rhs = Self>
where Self: TryFrom<M>, <Self as TryFrom<M>>::Error: Debug,
{ type Output; // Required method fn pow_mod(self, rhs: Rhs, modulus: M) -> Self::Output; }
Expand description

A trait to raise an integer to a power and constrain the result to a modulus.

Required Associated Types§

source

type Output

The output type.

Required Methods§

source

fn pow_mod(self, rhs: Rhs, modulus: M) -> Self::Output

Raise an integer to a power and constrain the result to a modulus.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, M> PowMod<M> for T
where T: Integer + TryFrom<M> + Constrain<M> + FromPrimitive + MulMod<M, Output = T> + DivMod<M>, <T as TryFrom<M>>::Error: Debug, M: Modulus<T>,

§

type Output = T