Skip to main content
This is unreleased documentation for the main (development) branch of crypto-glue.

NegMod

Trait NegMod 

Source
pub trait NegMod<Mod = NonZero<Self>> {
    type Output;

    // Required method
    fn neg_mod(&self, p: &Mod) -> Self::Output;
}
Expand description

Compute -self mod p.

Required Associated Types§

Source

type Output

Output type.

Required Methods§

Source

fn neg_mod(&self, p: &Mod) -> Self::Output

Compute -self mod p.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl NegMod for BoxedUint

Source§

impl NegMod for Limb

Source§

impl<const LIMBS: usize> NegMod for Uint<LIMBS>

Source§

type Output = Uint<LIMBS>