Skip to main content

InvertMod

Trait InvertMod 

Source
pub trait InvertMod<Mod = NonZero<Self>>: Sized {
    type Output;

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

Compute 1 / self mod p.

Required Associated Types§

Source

type Output

Output type.

Required Methods§

Source

fn invert_mod(&self, p: &Mod) -> CtOption<Self::Output>

Compute 1 / self mod p.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

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

Source§

type Output = Uint<LIMBS>

Source§

impl<const LIMBS: usize> InvertMod<NonZero<Uint<LIMBS>>> for Int<LIMBS>
where Uint<LIMBS>: InvertMod<Output = Uint<LIMBS>>,

Source§

type Output = Uint<LIMBS>