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 new(divisor: NonZero<Limb>) -> Self
pub const fn new(divisor: NonZero<Limb>) -> Self
Pre-calculates a reciprocal for a known divisor, to be used in the single-limb division later.
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§fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
fn conditional_select(a: &Self, b: &Self, choice: Choice) -> Self
Source§fn conditional_assign(&mut self, other: &Self, choice: Choice)
fn conditional_assign(&mut self, other: &Self, choice: Choice)
Source§fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
fn conditional_swap(a: &mut Self, b: &mut Self, choice: Choice)
Conditionally swap
self
and other
if choice == 1
; otherwise,
reassign both unto themselves. Read moreSource§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
impl Copy for Reciprocal
impl Eq for Reciprocal
impl StructuralPartialEq for Reciprocal
Auto Trait Implementations§
impl Freeze for Reciprocal
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