# Struct ramp::ll::limb_ptr::Limbs [−] [src]

    pub struct Limbs {
        // some fields omitted
    }

A version of `*const Limb` that is bounds-checked when debug assertions are on

## Methods

### `impl Limbs`

#### `unsafe fn new(base: *const Limb, start: i32, end: i32) -> Limbs`

Create a new instance, pointing at `base` and valid from `base.offset(start)` to `base.offset(end)`.

#### `unsafe fn offset(self, x: isize) -> Limbs`

Move `self` to point to the `x`th Limbs from the current location.

## Methods from Deref<Target=Limb>

#### `const BITS: usize = 64`

#### `const B: Limb = Limb(1 << (Limb::BITS / 2))`

#### `fn high_part(self) -> Limb`

Returns the high half of the limb

#### `fn low_part(self) -> Limb`

Returns the low half of the limb

#### `fn add_overflow(self, other: Limb) -> (Limb, bool)`

Performs `self + other`, returning the result and whether or not the addition overflowed

#### `fn sub_overflow(self, other: Limb) -> (Limb, bool)`

Performs `self - other`, returning the result and whether or not the subtraction overflowed

#### `fn mul_lo(self, other: Limb) -> Limb`

Performs `self * other` returning the lower half of the product

#### `fn mul_hi(self, other: Limb) -> Limb`

Performs `self * other` returning the higher half of the product

#### `fn mul_hilo(self, other: Limb) -> (Limb, Limb)`

Performs `self * other` returning the two-limb result as (high, low).

#### `fn invert(self) -> Limb`

#### `fn high_bit_set(self) -> bool`

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`.

#### `fn leading_zeros(self) -> BaseInt`

Returns the number of leading zeros in the limb

#### `fn trailing_zeros(self) -> BaseInt`

Returns the number of trailing zeros in the limb

## Trait Implementations

### `impl PartialEq for Limbs`

#### `fn eq(&self, other: &Limbs) -> bool`

#### `fn ne(&self, other: &Rhs) -> bool` 1.0.0

### `impl PartialOrd for Limbs`

#### `fn partial_cmp(&self, other: &Limbs) -> Option<Ordering>`

#### `fn lt(&self, other: &Rhs) -> bool` 1.0.0

#### `fn le(&self, other: &Rhs) -> bool` 1.0.0

#### `fn gt(&self, other: &Rhs) -> bool` 1.0.0

#### `fn ge(&self, other: &Rhs) -> bool` 1.0.0

### `impl Eq for Limbs`

### `impl Ord for Limbs`

#### `fn cmp(&self, other: &Limbs) -> Ordering`

### `impl Deref for Limbs`

#### `type Target = Limb`

#### `fn deref(&self) -> &Limb`

### Derived Implementations

### `impl Debug for Limbs`

#### `fn fmt(&self, __arg_0: &mut Formatter) -> Result`

### `impl Clone for Limbs`

#### `fn clone(&self) -> Limbs`

#### `fn clone_from(&mut self, source: &Self)`1.0.0

### `impl Copy for Limbs`

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)