Trait SubChecked

Source
pub trait SubChecked<Rhs = Self>
where Rhs: ?Sized,
{ type Output; // Required method fn sub_checked(&self, rhs: &Rhs) -> Self::Output; }
Expand description

Binary operator for subtracting two values, enforcing an underflow never occurs.

Required Associated Types§

Required Methods§

Source

fn sub_checked(&self, rhs: &Rhs) -> Self::Output

Trait Implementations§

Source§

impl<E, I> Metrics<dyn SubChecked<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>
where E: Environment, I: IntegerType,

Source§

type Case = (Mode, Mode)

Source§

fn count( case: &<Integer<E, I> as Metrics<dyn SubChecked<Integer<E, I>, Output = Integer<E, I>>>>::Case, ) -> Count

Returns the number of constants, public inputs, private inputs, and constraints.
Source§

impl<E, I> OutputMode<dyn SubChecked<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>
where E: Environment, I: IntegerType,

Source§

type Case = (Mode, Mode)

Source§

fn output_mode( case: &<Integer<E, I> as OutputMode<dyn SubChecked<Integer<E, I>, Output = Integer<E, I>>>>::Case, ) -> Mode

Returns the mode of the output.

Implementors§

Source§

impl<E, I> SubChecked for Integer<E, I>
where E: Environment, I: IntegerType,

Source§

type Output = Integer<E, I>