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

AddMod

Trait AddMod 

Source
pub trait AddMod<Rhs = Self, Mod = NonZero<Self>> {
    type Output;

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

Compute self + rhs mod p.

Required Associated Types§

Source

type Output

Output type.

Required Methods§

Source

fn add_mod(&self, rhs: &Rhs, p: &Mod) -> Self::Output

Compute self + rhs mod p.

Assumes self and rhs are < p.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl AddMod for BoxedUint

Source§

impl AddMod for Limb

Source§

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

Source§

type Output = Uint<LIMBS>