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
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 more
sourceimpl<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 more
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 more
sourceimpl<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 more
sourceimpl<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 more
sourceimpl<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 more
sourceimpl<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 more
sourceimpl<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 more
sourceimpl<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 more
sourceimpl<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 more
sourceimpl<T: ConditionallySelectable> ConditionallySelectable for Wrapping<T>
impl<T: ConditionallySelectable> ConditionallySelectable for Wrapping<T>
sourceimpl<T: ConstantTimeEq> ConstantTimeEq for Wrapping<T>
impl<T: ConstantTimeEq> ConstantTimeEq for Wrapping<T>
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 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 more
sourceimpl 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 more
sourceimpl<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 more
sourceimpl 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 more
sourceimpl<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 more
sourceimpl<T: Ord> Ord for Wrapping<T>
impl<T: Ord> Ord 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>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
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 more
sourceimpl<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 more
sourceimpl<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 more
sourceimpl 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 more
sourceimpl<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 more
sourceimpl 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 more
sourceimpl<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 more
impl<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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more