Struct crypto_bigint::Wrapping
source · pub struct Wrapping<T>(pub T);
Expand description
Provides intentionally-wrapped arithmetic on T
.
This is analogous to core::num::Wrapping
but allows this crate to
define trait impls for this type.
Tuple Fields§
§0: T
Trait Implementations§
source§impl AddAssign<&Wrapping<Limb>> for Wrapping<Limb>
impl AddAssign<&Wrapping<Limb>> for Wrapping<Limb>
source§fn add_assign(&mut self, other: &Self)
fn add_assign(&mut self, other: &Self)
Performs the
+=
operation. Read moresource§impl<const LIMBS: usize> AddAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> AddAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
source§fn add_assign(&mut self, other: &Self)
fn add_assign(&mut self, other: &Self)
Performs the
+=
operation. Read moresource§impl AddAssign<Wrapping<Limb>> for Wrapping<Limb>
impl AddAssign<Wrapping<Limb>> for Wrapping<Limb>
source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moresource§impl<const LIMBS: usize> AddAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> AddAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+=
operation. Read moresource§impl<const LIMBS: usize> BitAndAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> BitAndAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
source§fn bitand_assign(&mut self, other: &Self)
fn bitand_assign(&mut self, other: &Self)
Performs the
&=
operation. Read moresource§impl<const LIMBS: usize> BitAndAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> BitAndAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
source§fn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
Performs the
&=
operation. Read moresource§impl<const LIMBS: usize> BitOrAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> BitOrAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
source§fn bitor_assign(&mut self, other: &Self)
fn bitor_assign(&mut self, other: &Self)
Performs the
|=
operation. Read moresource§impl<const LIMBS: usize> BitOrAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> BitOrAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
source§fn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Performs the
|=
operation. Read moresource§impl<const LIMBS: usize> BitXorAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> BitXorAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
source§fn bitxor_assign(&mut self, other: &Self)
fn bitxor_assign(&mut self, other: &Self)
Performs the
^=
operation. Read moresource§impl<const LIMBS: usize> BitXorAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> BitXorAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
source§fn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
Performs the
^=
operation. Read moresource§impl<T: ConditionallySelectable> ConditionallySelectable for Wrapping<T>
impl<T: ConditionallySelectable> ConditionallySelectable for Wrapping<T>
source§impl<T: ConstantTimeEq> ConstantTimeEq for Wrapping<T>
impl<T: ConstantTimeEq> ConstantTimeEq for Wrapping<T>
source§impl MulAssign<&Wrapping<Limb>> for Wrapping<Limb>
impl MulAssign<&Wrapping<Limb>> for Wrapping<Limb>
source§fn mul_assign(&mut self, other: &Self)
fn mul_assign(&mut self, other: &Self)
Performs the
*=
operation. Read moresource§impl<const LIMBS: usize> MulAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> MulAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
source§fn mul_assign(&mut self, other: &Self)
fn mul_assign(&mut self, other: &Self)
Performs the
*=
operation. Read moresource§impl MulAssign<Wrapping<Limb>> for Wrapping<Limb>
impl MulAssign<Wrapping<Limb>> for Wrapping<Limb>
source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*=
operation. Read moresource§impl<const LIMBS: usize> MulAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> MulAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
source§fn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*=
operation. Read moresource§impl<T: Ord> Ord for Wrapping<T>
impl<T: Ord> Ord for Wrapping<T>
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<T: PartialEq> PartialEq<Wrapping<T>> for Wrapping<T>
impl<T: PartialEq> PartialEq<Wrapping<T>> for Wrapping<T>
source§impl<T: PartialOrd> PartialOrd<Wrapping<T>> for Wrapping<T>
impl<T: PartialOrd> PartialOrd<Wrapping<T>> for Wrapping<T>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl SubAssign<&Wrapping<Limb>> for Wrapping<Limb>
impl SubAssign<&Wrapping<Limb>> for Wrapping<Limb>
source§fn sub_assign(&mut self, other: &Self)
fn sub_assign(&mut self, other: &Self)
Performs the
-=
operation. Read moresource§impl<const LIMBS: usize> SubAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> SubAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
source§fn sub_assign(&mut self, other: &Self)
fn sub_assign(&mut self, other: &Self)
Performs the
-=
operation. Read moresource§impl SubAssign<Wrapping<Limb>> for Wrapping<Limb>
impl SubAssign<Wrapping<Limb>> for Wrapping<Limb>
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read moresource§impl<const LIMBS: usize> SubAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> SubAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
source§fn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-=
operation. Read more