Skip to main content

Square

Trait Square 

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

Support for optimized squaring

Provided Methods§

fn square(&self) -> Self

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

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

§

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

§

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