pub trait Square: Sizedwhere
    for<'a> &'a Self: Mul<&'a Self, Output = Self>,{
    // Provided method
    fn square(&self) -> Self { ... }
}
Expand description

Support for optimized squaring

Provided Methods§

source

fn square(&self) -> Self

Computes the same as self.mul(self), but may be more efficient.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<MOD: ResidueParams<LIMBS>, const LIMBS: usize> Square for Residue<MOD, LIMBS>

source§

impl<const LIMBS: usize> Square for DynResidue<LIMBS>