Struct crypto_bigint::Reciprocal
source · pub struct Reciprocal { /* private fields */ }
Expand description
A pre-calculated reciprocal for division by a single limb.
Implementations§
source§impl Reciprocal
impl Reciprocal
sourcepub const fn ct_new(divisor: Limb) -> (Self, CtChoice)
pub const fn ct_new(divisor: Limb) -> (Self, CtChoice)
Pre-calculates a reciprocal for a known divisor,
to be used in the single-limb division later.
Returns the reciprocal, and the truthy value if divisor != 0
and the falsy value otherwise.
Note: if the returned flag is falsy, the returned reciprocal object is still self-consistent and can be passed to functions here without causing them to panic, but the results are naturally not to be used.
Trait Implementations§
source§impl Clone for Reciprocal
impl Clone for Reciprocal
source§fn clone(&self) -> Reciprocal
fn clone(&self) -> Reciprocal
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl ConditionallySelectable for Reciprocal
impl ConditionallySelectable for Reciprocal
source§impl Debug for Reciprocal
impl Debug for Reciprocal
source§impl Default for Reciprocal
impl Default for Reciprocal
source§impl PartialEq for Reciprocal
impl PartialEq for Reciprocal
source§fn eq(&self, other: &Reciprocal) -> bool
fn eq(&self, other: &Reciprocal) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for Reciprocal
impl Eq for Reciprocal
impl StructuralEq for Reciprocal
impl StructuralPartialEq for Reciprocal
Auto Trait Implementations§
impl RefUnwindSafe for Reciprocal
impl Send for Reciprocal
impl Sync for Reciprocal
impl Unpin for Reciprocal
impl UnwindSafe for Reciprocal
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more