[−][src]Struct ramp::ll::limb::Limb
Helper newtype for operations.
A "Limb" is a single digit in base 2^word size.
Implementations
impl Limb
[src]
pub const BITS: usize
[src]
pub const B: Limb
[src]
pub fn high_part(self) -> Limb
[src]
Returns the high half of the limb
pub fn low_part(self) -> Limb
[src]
Returns the low half of the limb
pub fn add_overflow(self, other: Limb) -> (Limb, bool)
[src]
Performs self + other
, returning the result and whether or not the addition overflowed
pub fn sub_overflow(self, other: Limb) -> (Limb, bool)
[src]
Performs self - other
, returning the result and whether or not the subtraction overflowed
pub fn mul_lo(self, other: Limb) -> Limb
[src]
Performs self * other
returning the lower half of the product
pub fn mul_hi(self, other: Limb) -> Limb
[src]
Performs self * other
returning the higher half of the product
pub fn mul_hilo(self, other: Limb) -> (Limb, Limb)
[src]
Performs self * other
returning the two-limb result as (high, low).
pub fn invert(self) -> Limb
[src]
pub fn high_bit_set(self) -> bool
[src]
Returns whether or not the highest bit in the limb is set.
Division algorithms often require the highest limb of the divisor
to be d >= BASE/2
.
pub fn leading_zeros(self) -> BaseInt
[src]
Returns the number of leading zeros in the limb
pub fn trailing_zeros(self) -> BaseInt
[src]
Returns the number of trailing zeros in the limb
Trait Implementations
impl Add<Limb> for Limb
[src]
type Output = Limb
The resulting type after applying the +
operator.
fn add(self, other: Limb) -> Limb
[src]
impl Add<Limb> for BaseInt
[src]
type Output = Limb
The resulting type after applying the +
operator.
fn add(self, other: Limb) -> Limb
[src]
impl Add<Limb> for Int
[src]
type Output = Int
The resulting type after applying the +
operator.
fn add(self, other: Limb) -> Int
[src]
impl Add<bool> for Limb
[src]
type Output = Limb
The resulting type after applying the +
operator.
fn add(self, other: bool) -> Limb
[src]
impl Add<u32> for Limb
[src]
type Output = Limb
The resulting type after applying the +
operator.
fn add(self, other: BaseInt) -> Limb
[src]
impl AddAssign<Limb> for Int
[src]
fn add_assign(&mut self, other: Limb)
[src]
impl BitAnd<Limb> for Limb
[src]
type Output = Limb
The resulting type after applying the &
operator.
fn bitand(self, other: Limb) -> Limb
[src]
impl<'a> BitAnd<Limb> for Int
[src]
type Output = Int
The resulting type after applying the &
operator.
fn bitand(self, other: Limb) -> Int
[src]
impl BitAndAssign<Limb> for Int
[src]
fn bitand_assign(&mut self, other: Limb)
[src]
impl BitOr<Limb> for Limb
[src]
type Output = Limb
The resulting type after applying the |
operator.
fn bitor(self, other: Limb) -> Limb
[src]
impl BitOr<Limb> for Int
[src]
type Output = Int
The resulting type after applying the |
operator.
fn bitor(self, other: Limb) -> Int
[src]
impl BitOrAssign<Limb> for Int
[src]
fn bitor_assign(&mut self, other: Limb)
[src]
impl BitXor<Limb> for Limb
[src]
type Output = Limb
The resulting type after applying the ^
operator.
fn bitxor(self, other: Limb) -> Limb
[src]
impl<'a> BitXor<Limb> for Int
[src]
type Output = Int
The resulting type after applying the ^
operator.
fn bitxor(self, other: Limb) -> Int
[src]
impl BitXorAssign<Limb> for Int
[src]
fn bitxor_assign(&mut self, other: Limb)
[src]
impl Clone for Limb
[src]
impl Copy for Limb
[src]
impl Debug for Limb
[src]
impl Display for Limb
[src]
impl Div<Limb> for Limb
[src]
type Output = Limb
The resulting type after applying the /
operator.
fn div(self, other: Limb) -> Limb
[src]
impl Div<Limb> for Int
[src]
type Output = Int
The resulting type after applying the /
operator.
fn div(self, other: Limb) -> Int
[src]
impl Div<u32> for Limb
[src]
type Output = Limb
The resulting type after applying the /
operator.
fn div(self, other: BaseInt) -> Limb
[src]
impl DivAssign<Limb> for Int
[src]
fn div_assign(&mut self, other: Limb)
[src]
impl DivRem<Limb> for Int
[src]
impl Eq for Limb
[src]
impl Hash for Limb
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Mul<Limb> for Limb
[src]
type Output = Limb
The resulting type after applying the *
operator.
fn mul(self, other: Limb) -> Limb
[src]
impl Mul<Limb> for BaseInt
[src]
type Output = Limb
The resulting type after applying the *
operator.
fn mul(self, other: Limb) -> Limb
[src]
impl Mul<Limb> for Int
[src]
type Output = Int
The resulting type after applying the *
operator.
fn mul(self, other: Limb) -> Int
[src]
impl Mul<u32> for Limb
[src]
type Output = Limb
The resulting type after applying the *
operator.
fn mul(self, other: BaseInt) -> Limb
[src]
impl MulAssign<Limb> for Int
[src]
fn mul_assign(&mut self, other: Limb)
[src]
impl Neg for Limb
[src]
impl Not for Limb
[src]
impl Ord for Limb
[src]
fn cmp(&self, other: &Limb) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<Int> for Limb
[src]
impl PartialEq<Limb> for Limb
[src]
impl PartialEq<Limb> for Int
[src]
impl PartialEq<u32> for Limb
[src]
impl PartialOrd<Int> for Limb
[src]
fn partial_cmp(&self, other: &Int) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<Limb> for Limb
[src]
fn partial_cmp(&self, other: &Limb) -> Option<Ordering>
[src]
fn lt(&self, other: &Limb) -> bool
[src]
fn le(&self, other: &Limb) -> bool
[src]
fn gt(&self, other: &Limb) -> bool
[src]
fn ge(&self, other: &Limb) -> bool
[src]
impl PartialOrd<Limb> for Int
[src]
fn partial_cmp(&self, other: &Limb) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl PartialOrd<u32> for Limb
[src]
fn partial_cmp(&self, other: &BaseInt) -> Option<Ordering>
[src]
fn lt(&self, other: &BaseInt) -> bool
[src]
fn le(&self, other: &BaseInt) -> bool
[src]
fn gt(&self, other: &BaseInt) -> bool
[src]
fn ge(&self, other: &BaseInt) -> bool
[src]
impl Rem<Limb> for Limb
[src]
type Output = Limb
The resulting type after applying the %
operator.
fn rem(self, other: Limb) -> Limb
[src]
impl Rem<Limb> for Int
[src]
type Output = Int
The resulting type after applying the %
operator.
fn rem(self, other: Limb) -> Int
[src]
impl Rem<u32> for Limb
[src]
type Output = Limb
The resulting type after applying the %
operator.
fn rem(self, other: BaseInt) -> Limb
[src]
impl RemAssign<Limb> for Int
[src]
fn rem_assign(&mut self, other: Limb)
[src]
impl<I> Shl<I> for Limb where
BaseInt: Shl<I, Output = BaseInt>,
[src]
BaseInt: Shl<I, Output = BaseInt>,
type Output = Limb
The resulting type after applying the <<
operator.
fn shl(self, other: I) -> Limb
[src]
impl<I> Shr<I> for Limb where
BaseInt: Shr<I, Output = BaseInt>,
[src]
BaseInt: Shr<I, Output = BaseInt>,
type Output = Limb
The resulting type after applying the >>
operator.
fn shr(self, other: I) -> Limb
[src]
impl StructuralEq for Limb
[src]
impl Sub<Limb> for Limb
[src]
type Output = Limb
The resulting type after applying the -
operator.
fn sub(self, other: Limb) -> Limb
[src]
impl Sub<Limb> for BaseInt
[src]
type Output = Limb
The resulting type after applying the -
operator.
fn sub(self, other: Limb) -> Limb
[src]
impl Sub<Limb> for Int
[src]
type Output = Int
The resulting type after applying the -
operator.
fn sub(self, other: Limb) -> Int
[src]
impl Sub<bool> for Limb
[src]
type Output = Limb
The resulting type after applying the -
operator.
fn sub(self, other: bool) -> Limb
[src]
impl Sub<u32> for Limb
[src]
type Output = Limb
The resulting type after applying the -
operator.
fn sub(self, other: BaseInt) -> Limb
[src]
impl SubAssign<Limb> for Int
[src]
fn sub_assign(&mut self, other: Limb)
[src]
Auto Trait Implementations
impl RefUnwindSafe for Limb
impl Send for Limb
impl Sync for Limb
impl Unpin for Limb
impl UnwindSafe for Limb
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, Rhs, Output> NumOps<Rhs, Output> for T where
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
[src]
T: Sub<Rhs, Output = Output> + Mul<Rhs, Output = Output> + Div<Rhs, Output = Output> + Add<Rhs, Output = Output> + Rem<Rhs, Output = Output>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,