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: TTrait Implementations
sourceimpl AddAssign<&Wrapping<Limb>> for Wrapping<Limb>
impl AddAssign<&Wrapping<Limb>> for Wrapping<Limb>
sourcefn add_assign(&mut self, other: &Self)
fn add_assign(&mut self, other: &Self)
Performs the
+= operation. Read moresourceimpl<const LIMBS: usize> AddAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> AddAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
sourcefn add_assign(&mut self, other: &Self)
fn add_assign(&mut self, other: &Self)
Performs the
+= operation. Read moresourceimpl AddAssign<Wrapping<Limb>> for Wrapping<Limb>
impl AddAssign<Wrapping<Limb>> for Wrapping<Limb>
sourcefn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+= operation. Read moresourceimpl<const LIMBS: usize> AddAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> AddAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
sourcefn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Performs the
+= operation. Read moresourceimpl<const LIMBS: usize> BitAndAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> BitAndAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
sourcefn bitand_assign(&mut self, other: &Self)
fn bitand_assign(&mut self, other: &Self)
Performs the
&= operation. Read moresourceimpl<const LIMBS: usize> BitAndAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> BitAndAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
sourcefn bitand_assign(&mut self, other: Self)
fn bitand_assign(&mut self, other: Self)
Performs the
&= operation. Read moresourceimpl<const LIMBS: usize> BitOrAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> BitOrAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
sourcefn bitor_assign(&mut self, other: &Self)
fn bitor_assign(&mut self, other: &Self)
Performs the
|= operation. Read moresourceimpl<const LIMBS: usize> BitOrAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> BitOrAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
sourcefn bitor_assign(&mut self, other: Self)
fn bitor_assign(&mut self, other: Self)
Performs the
|= operation. Read moresourceimpl<const LIMBS: usize> BitXorAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> BitXorAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
sourcefn bitxor_assign(&mut self, other: &Self)
fn bitxor_assign(&mut self, other: &Self)
Performs the
^= operation. Read moresourceimpl<const LIMBS: usize> BitXorAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> BitXorAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
sourcefn bitxor_assign(&mut self, other: Self)
fn bitxor_assign(&mut self, other: Self)
Performs the
^= operation. Read moresourceimpl<T: ConditionallySelectable> ConditionallySelectable for Wrapping<T>
impl<T: ConditionallySelectable> ConditionallySelectable for Wrapping<T>
sourcefn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
sourcefn conditional_assign(&mut self, other: &Self, choice: Choice)
fn conditional_assign(&mut self, other: &Self, choice: Choice)
sourceimpl<T: ConstantTimeEq> ConstantTimeEq for Wrapping<T>
impl<T: ConstantTimeEq> ConstantTimeEq for Wrapping<T>
sourceimpl<'de, T: Deserialize<'de>> Deserialize<'de> for Wrapping<T>
Available on crate feature serde only.
impl<'de, T: Deserialize<'de>> Deserialize<'de> for Wrapping<T>
Available on crate feature
serde only.sourcefn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl<const LIMBS: usize> DivAssign<&NonZero<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> DivAssign<&NonZero<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
sourcefn div_assign(&mut self, rhs: &NonZero<UInt<LIMBS>>)
fn div_assign(&mut self, rhs: &NonZero<UInt<LIMBS>>)
Performs the
/= operation. Read moresourceimpl<const LIMBS: usize> DivAssign<NonZero<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> DivAssign<NonZero<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
sourcefn div_assign(&mut self, rhs: NonZero<UInt<LIMBS>>)
fn div_assign(&mut self, rhs: NonZero<UInt<LIMBS>>)
Performs the
/= operation. Read moresourceimpl MulAssign<&Wrapping<Limb>> for Wrapping<Limb>
impl MulAssign<&Wrapping<Limb>> for Wrapping<Limb>
sourcefn mul_assign(&mut self, other: &Self)
fn mul_assign(&mut self, other: &Self)
Performs the
*= operation. Read moresourceimpl<const LIMBS: usize> MulAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> MulAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
sourcefn mul_assign(&mut self, other: &Self)
fn mul_assign(&mut self, other: &Self)
Performs the
*= operation. Read moresourceimpl MulAssign<Wrapping<Limb>> for Wrapping<Limb>
impl MulAssign<Wrapping<Limb>> for Wrapping<Limb>
sourcefn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*= operation. Read moresourceimpl<const LIMBS: usize> MulAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> MulAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
sourcefn mul_assign(&mut self, other: Self)
fn mul_assign(&mut self, other: Self)
Performs the
*= operation. Read moresourceimpl<T: Ord> Ord for Wrapping<T>
impl<T: Ord> Ord for Wrapping<T>
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl<T: PartialEq> PartialEq<Wrapping<T>> for Wrapping<T>
impl<T: PartialEq> PartialEq<Wrapping<T>> for Wrapping<T>
sourceimpl<T: PartialOrd> PartialOrd<Wrapping<T>> for Wrapping<T>
impl<T: PartialOrd> PartialOrd<Wrapping<T>> for Wrapping<T>
sourcefn partial_cmp(&self, other: &Wrapping<T>) -> Option<Ordering>
fn partial_cmp(&self, other: &Wrapping<T>) -> Option<Ordering>
1.0.0 · sourcefn 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 moresourceimpl<const LIMBS: usize> RemAssign<&NonZero<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> RemAssign<&NonZero<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
sourcefn rem_assign(&mut self, rhs: &NonZero<UInt<LIMBS>>)
fn rem_assign(&mut self, rhs: &NonZero<UInt<LIMBS>>)
Performs the
%= operation. Read moresourceimpl<const LIMBS: usize> RemAssign<NonZero<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> RemAssign<NonZero<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
sourcefn rem_assign(&mut self, rhs: NonZero<UInt<LIMBS>>)
fn rem_assign(&mut self, rhs: NonZero<UInt<LIMBS>>)
Performs the
%= operation. Read moresourceimpl SubAssign<&Wrapping<Limb>> for Wrapping<Limb>
impl SubAssign<&Wrapping<Limb>> for Wrapping<Limb>
sourcefn sub_assign(&mut self, other: &Self)
fn sub_assign(&mut self, other: &Self)
Performs the
-= operation. Read moresourceimpl<const LIMBS: usize> SubAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> SubAssign<&Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
sourcefn sub_assign(&mut self, other: &Self)
fn sub_assign(&mut self, other: &Self)
Performs the
-= operation. Read moresourceimpl SubAssign<Wrapping<Limb>> for Wrapping<Limb>
impl SubAssign<Wrapping<Limb>> for Wrapping<Limb>
sourcefn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-= operation. Read moresourceimpl<const LIMBS: usize> SubAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
impl<const LIMBS: usize> SubAssign<Wrapping<UInt<LIMBS>>> for Wrapping<UInt<LIMBS>>
sourcefn sub_assign(&mut self, other: Self)
fn sub_assign(&mut self, other: Self)
Performs the
-= operation. Read moreimpl<T: Copy> Copy for Wrapping<T>
impl<T: Eq> Eq for Wrapping<T>
impl<T> StructuralEq for Wrapping<T>
impl<T> StructuralPartialEq for Wrapping<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Wrapping<T>where
T: RefUnwindSafe,
impl<T> Send for Wrapping<T>where
T: Send,
impl<T> Sync for Wrapping<T>where
T: Sync,
impl<T> Unpin for Wrapping<T>where
T: Unpin,
impl<T> UnwindSafe for Wrapping<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more