# Trait rand::distributions::Sample [−] [src]

    pub trait Sample<Support> {
        fn sample<R: Rng>(&mut self, rng: &mut R) -> Support;
    }

Types that can be used to create a random instance of `Support`.

## Required Methods

### `fn sample<R: Rng>(&mut self, rng: &mut R) -> Support`

Generate a random value of `Support`, using `rng` as the source of randomness.

## Implementors

- [src]
  `impl<Sup: SampleRange> Sample<Sup> for Range<Sup>`
- [src]
  `impl Sample<f64> for Gamma`
- [src]
  `impl Sample<f64> for ChiSquared`
- [src]
  `impl Sample<f64> for FisherF`
- [src]
  `impl Sample<f64> for StudentT`
- [src]
  `impl Sample<f64> for Normal`
- [src]
  `impl Sample<f64> for LogNormal`
- [src]
  `impl Sample<f64> for Exp`
- [src]
  `impl<Sup: Rand> Sample<Sup> for RandSample<Sup>`
- [src]
  `impl<'a, T: Clone> Sample<T> for WeightedChoice<'a, T>`

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