pub trait AddWrapped<Rhs = Self>where
    Rhs: ?Sized,{
    type Output;

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

Binary operator for adding two values, wrapping the sum if an overflow occurs.

Required Associated Types§

type Output

Required Methods§

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

Trait Implementations§

§

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

§

type Case = (Mode, Mode)

§

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

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

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

§

type Case = (Mode, Mode)

§

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

Returns the mode of the output.

Implementations on Foreign Types§

§

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

§

fn add_wrapped( &self, other: &Integer<E, I> ) -> <Integer<E, I> as AddWrapped<Integer<E, I>>>::Output

Returns the sum of self and other.

§

type Output = Integer<E, I>

§

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

§

type Output = Integer<E, I>

§

fn add_wrapped( &self, other: &Integer<E, I> ) -> <Integer<E, I> as AddWrapped<Integer<E, I>>>::Output

Implementors§