pub(crate) struct ExtendedUint<const LIMBS: usize, const EXTENSION_LIMBS: usize>(Uint<LIMBS>, Uint<EXTENSION_LIMBS>);Tuple Fields§
§0: Uint<LIMBS>§1: Uint<EXTENSION_LIMBS>Implementations§
Source§impl<const LIMBS: usize, const EXTRA: usize> ExtendedUint<LIMBS, EXTRA>
impl<const LIMBS: usize, const EXTRA: usize> ExtendedUint<LIMBS, EXTRA>
Sourcepub const fn from_product(lhs: Uint<LIMBS>, rhs: Uint<EXTRA>) -> Self
pub const fn from_product(lhs: Uint<LIMBS>, rhs: Uint<EXTRA>) -> Self
Construct an ExtendedUint from the product of a Uint<LIMBS> and an Uint<EXTRA>.
Assumes the top bit of the product is not set.
Sourcepub const fn wrapping_mul<const RHS_LIMBS: usize>(
&self,
rhs: &Uint<RHS_LIMBS>,
) -> Self
pub const fn wrapping_mul<const RHS_LIMBS: usize>( &self, rhs: &Uint<RHS_LIMBS>, ) -> Self
Wrapping multiply self with rhs
Sourcepub const fn as_extended_int(&self) -> ExtendedInt<LIMBS, EXTRA>
pub const fn as_extended_int(&self) -> ExtendedInt<LIMBS, EXTRA>
Interpret self as an ExtendedInt
Sourcepub const fn checked_drop_extension(&self) -> CtOption<Uint<LIMBS>>
pub const fn checked_drop_extension(&self) -> CtOption<Uint<LIMBS>>
Drop the extension.
Sourcepub const fn wrapping_neg(&self) -> Self
pub const fn wrapping_neg(&self) -> Self
Construction the binary negation of self, i.e., map self to !self + 1.
Note: maps 0 to itself.
Sourcepub const fn wrapping_neg_if(&self, negate: Choice) -> Self
pub const fn wrapping_neg_if(&self, negate: Choice) -> Self
Negate self if negate is truthy. Otherwise returns self.
Sourcepub const fn bounded_shr<const UPPER_BOUND: u32>(&self, shift: u32) -> Self
pub const fn bounded_shr<const UPPER_BOUND: u32>(&self, shift: u32) -> Self
Sourcepub const fn shr_vartime(&self, shift: u32) -> Self
pub const fn shr_vartime(&self, shift: u32) -> Self
Auto Trait Implementations§
impl<const LIMBS: usize, const EXTENSION_LIMBS: usize> Freeze for ExtendedUint<LIMBS, EXTENSION_LIMBS>
impl<const LIMBS: usize, const EXTENSION_LIMBS: usize> RefUnwindSafe for ExtendedUint<LIMBS, EXTENSION_LIMBS>
impl<const LIMBS: usize, const EXTENSION_LIMBS: usize> Send for ExtendedUint<LIMBS, EXTENSION_LIMBS>
impl<const LIMBS: usize, const EXTENSION_LIMBS: usize> Sync for ExtendedUint<LIMBS, EXTENSION_LIMBS>
impl<const LIMBS: usize, const EXTENSION_LIMBS: usize> Unpin for ExtendedUint<LIMBS, EXTENSION_LIMBS>
impl<const LIMBS: usize, const EXTENSION_LIMBS: usize> UnsafeUnpin for ExtendedUint<LIMBS, EXTENSION_LIMBS>
impl<const LIMBS: usize, const EXTENSION_LIMBS: usize> UnwindSafe for ExtendedUint<LIMBS, EXTENSION_LIMBS>
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