Skip to main content

Module ct_neg

Module ct_neg 

Source

Macros§

impl_ct_neg_for_unsigned_nonzero 🔒
Unfortunately NonZeroU* doesn’t support wrapping_neg for some reason (but NonZeroI* does), even though the wrapping negation of any non-zero integer should also be non-zero.
impl_signed_ct_neg 🔒
impl_unsigned_ct_neg 🔒

Traits§

CtNeg
Constant-time conditional negation: negates a value when choice is Choice::TRUE.