Trait modicum::SubMod

source ·
pub trait SubMod<M: Modulus<Self>, Rhs = Self>
where Self: TryFrom<M>, <Self as TryFrom<M>>::Error: Debug,
{ type Output; // Required method fn sub_mod(self, rhs: Rhs, modulus: M) -> Self::Output; }
Expand description

A trait to subtract two integers and constrain the result to a modulus.

Required Associated Types§

source

type Output

The output type.

Required Methods§

source

fn sub_mod(self, rhs: Rhs, modulus: M) -> Self::Output

Subtract two integers and constrain the result to a modulus.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, M> SubMod<M> for T
where T: Integer + TryFrom<M>, <T as TryFrom<M>>::Error: Debug, M: Modulus<T>,

§

type Output = T