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§
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,
impl<E, I> Metrics<dyn AddWrapped<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>where
E: Environment,
I: IntegerType,
Source§impl<E, I> OutputMode<dyn AddWrapped<Integer<E, I>, Output = Integer<E, I>>> for Integer<E, I>where
E: Environment,
I: IntegerType,
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)
Source§fn output_mode(
case: &<Integer<E, I> as OutputMode<dyn AddWrapped<Integer<E, I>, Output = Integer<E, I>>>>::Case,
) -> 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.