# [−][src]Trait num_bigint::RandBigInt

    pub trait RandBigInt {
        fn gen_biguint(&mut self, bit_size: usize) -> BigUint;
        fn gen_bigint(&mut self, bit_size: usize) -> BigInt;
        fn gen_biguint_below(&mut self, bound: &BigUint) -> BigUint;
        fn gen_biguint_range(
            &mut self,
            lbound: &BigUint,
            ubound: &BigUint
        ) -> BigUint;
        fn gen_bigint_range(&mut self, lbound: &BigInt, ubound: &BigInt) -> BigInt;
    }

## Required methods

### `fn gen_biguint(&mut self, bit_size: usize) -> BigUint`

Generate a random `BigUint` of the given bit size.

### `fn gen_bigint(&mut self, bit_size: usize) -> BigInt`

Generate a random BigInt of the given bit size.

### `fn gen_biguint_below(&mut self, bound: &BigUint) -> BigUint`

Generate a random `BigUint` less than the given bound. Fails when the bound is zero.

### `fn gen_biguint_range(&mut self, lbound: &BigUint, ubound: &BigUint) -> BigUint`

Generate a random `BigUint` within the given range. The lower bound is inclusive; the upper bound is exclusive. Fails when the upper bound is not greater than the lower bound.

### `fn gen_bigint_range(&mut self, lbound: &BigInt, ubound: &BigInt) -> BigInt`

Generate a random `BigInt` within the given range. The lower bound is inclusive; the upper bound is exclusive. Fails when the upper bound is not greater than the lower bound.

Loading content...

## Implementors

### `impl<R: Rng> RandBigInt for R`[src]

#### `fn gen_biguint(&mut self, bit_size: usize) -> BigUint`[src]

#### `fn gen_bigint(&mut self, bit_size: usize) -> BigInt`[src]

#### `fn gen_biguint_below(&mut self, bound: &BigUint) -> BigUint`[src]

#### `fn gen_biguint_range(&mut self, lbound: &BigUint, ubound: &BigUint) -> BigUint`[src]

#### `fn gen_bigint_range(&mut self, lbound: &BigInt, ubound: &BigInt) -> BigInt`[src]

Loading content...

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## 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`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)