Trait AddWrapped

Source
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§

Required Methods§

Source

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

Trait Implementations§

Source§

impl<E, I> Metrics<dyn AddWrapped<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 AddWrapped<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 AddWrapped<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 AddWrapped<Integer<E, I>, Output = Integer<E, I>>>>::Case, ) -> Mode

Returns the mode of the output.

Implementations on Foreign Types§

Source§

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

Source§

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

Returns the sum of self and other.

Source§

type Output = Integer<E, I>

Implementors§

Source§

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

Source§

type Output = Integer<E, I>