trait LimbHelpers:
Sized
+ AsRef<[Limb]>
+ AsMut<[Limb]> {
// Provided methods
fn double(self) -> Self { ... }
fn ct_neg_mod(self, modulus: &Self, negate: Choice) -> (Choice, Self) { ... }
fn sub_mod(self, b: &Self, modulus: &Self) -> Self { ... }
}Provided Methods§
Sourcefn double(self) -> Self
fn double(self) -> Self
Double the input.
This assumes the result will fit within the same amount of limbs.
Sourcefn ct_neg_mod(self, modulus: &Self, negate: Choice) -> (Choice, Self)
fn ct_neg_mod(self, modulus: &Self, negate: Choice) -> (Choice, Self)
Negate self modulo modulus if negate == true.
This assumes self and modulus have the same amount of limbs and that self <= modulus.
This will return if the input was 0 (as an integer, not as congruent to) and the value.
The value may be the modulus (as congruent to 0) but only if the input was 0 and negate
was true.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".