searchState.loadedDescShard("rand", 0, "Utilities for random number generation\nCodes at or above this point can be used by users to …\nA marker trait used to indicate that an RngCore or …\nError type of random number generators\nTypes which may be filled with random data\nCodes below this point represent OS Errors (i.e. positive …\nAn automatically-implemented extension trait on RngCore …\nThe core of a random number generator.\nSeed type, which is restricted to types …\nA random number generator that can be explicitly seeded.\nRetrieve the error code, if any.\nGenerating random samples from probability distributions\nFill any type implementing Fill with random data\nFill any type implementing Fill with random data\nFill dest with random data.\nReturns the argument unchanged.\nCreates a new instance of the RNG seeded via getrandom.\nCreate a new PRNG seeded from another Rng.\nCreate a new PRNG using the given seed.\nReturn a random value supporting the Standard distribution.\nReturn a random value supporting the Standard distribution.\nReturn a bool with a probability p of being true.\nReturn a bool with a probability p of being true.\nGenerate a random value in the given range.\nGenerate a random value in the given range.\nReturn a bool with a probability of numerator/denominator …\nReturn a bool with a probability of numerator/denominator …\nReference the inner error (std only)\nCalls U::from(self).\nConstruct from any type supporting std::error::Error\nReturn the next random u32.\nReturn the next random u64.\nConvenience re-export of common members\nGenerates a random value using the thread-local random …\nExtract the raw OS error code (if this error came from the …\nRandom number generators and adapters\nSample a new value, using the given distribution.\nSample a new value, using the given distribution.\nCreate an iterator that generates values using the given …\nCreate an iterator that generates values using the given …\nCreate a new PRNG using a u64 seed.\nSequence-related functionality\nUnwrap the inner error (std only)\nRetrieve the lazily-initialized thread-local random number …\nFill self with random data\nFill any type implementing Fill with random data\nFill any type implementing Fill with random data\nFill dest entirely with random data.\nAll items in the provided weight collection are zero.\nSample a u8, uniformly distributed over ASCII letters and …\nThe Bernoulli distribution.\nError type returned from Bernoulli::new.\nAn iterator that generates random values of T with …\nA distribution of values of type S derived from the …\nString sampler\nTypes (distributions) that can be used to create a random …\np < 0 or p > 1.\nA weight is either less than zero, greater than the …\nThe provided weight collection contains no items.\nA distribution to sample floating point numbers uniformly …\nA distribution to sample floating point numbers uniformly …\nA distribution to sample items uniformly from a slice.\nA generic random value distribution, implemented for many …\nToo many weights are provided (length greater than u32::MAX…\nSample values uniformly between two bounds.\nError type returned from WeightedIndex::new.\nA distribution using weighted sampling of discrete items\nAppend len random chars to string\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nConstruct a new Bernoulli with the probability of success …\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCreate a distribution of values of ‘S’ by mapping the …\nCreate a distribution of values of ‘S’ by mapping the …\nConstruct a new Bernoulli with the given probability of …\nCreate a new Slice instance which samples uniformly from …\nCreates a new a WeightedIndex Distribution using the values\nGenerate a random value of T, using rng as the source of …\nCreate an iterator that generates random values of T, …\nCreate an iterator that generates random values of T, …\nGenerate a String of len random chars\nGenerate a String of len random chars\nA distribution uniformly sampling numbers within a given …\nUpdate a subset of weights, without changing the number of …\nWeighted index sampling\nHelper trait similar to Borrow but implemented only for …\nRange that supports generating a single sample efficiently.\nHelper trait for creating objects using the correct …\nThe UniformSampler implementation supporting type X.\nSample values uniformly between two bounds.\nThe back-end implementing UniformSampler for char.\nThe back-end implementing UniformSampler for Duration.\nThe back-end implementing UniformSampler for …\nThe back-end implementing UniformSampler for integer types.\nHelper trait handling actual uniform sampling.\nThe type sampled by this implementation.\nImmutably borrows from an owned value. See Borrow::borrow\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCheck whether the range is empty.\nConstruct self, with inclusive lower bound and exclusive …\nCreate a new Uniform instance which samples uniformly from …\nConstruct self, with inclusive bounds [low, high].\nCreate a new Uniform instance which samples uniformly from …\nSample a value.\nGenerate a sample from the given range.\nSample a single value uniformly from a range with …\nSample a single value uniformly from a range with …\nReturns the argument unchanged.\nCalls U::from(self).\nA random number generator that retrieves randomness from …\nThe standard RNG. The PRNG algorithm in StdRng is chosen …\nA reference to the thread-local generator\nWrappers / adapters forming RNGs\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nMock random number generator\nReadRng error type\nAn RNG that reads random bytes straight from any type …\nA wrapper around any PRNG that implements BlockRngCore, …\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nCreate a new ReadRng from a Read.\nCreate a new ReseedingRng from an existing PRNG, combined …\nReseed the internal PRNG.\nA simple implementation of RngCore for testing purposes.\nReturns the argument unchanged.\nCalls U::from(self).\nCreate a StepRng, yielding an arithmetic sequence starting …\nThe element type.\nExtension trait on iterators, providing random sampling …\nAn iterator over multiple slice elements.\nExtension trait on slices, providing random mutation and …\nReturns a reference to one random element of the slice, or …\nChoose one element at random from the iterator.\nChooses amount elements from the slice at random, without …\nCollects amount values at random from the iterator into a …\nCollects values at random from the iterator into a …\nSimilar to choose_multiple, but where the likelihood of …\nReturns a mutable reference to one random element of the …\nChoose one element at random from the iterator.\nSimilar to choose, but where the likelihood of each …\nSimilar to choose_mut, but where the likelihood of each …\nReturns the argument unchanged.\nLow-level API for sampling indices\nCalls U::from(self).\nShuffle a slice in place, but exit early.\nShuffle a mutable slice in place.\nA vector of indices.\nReturn type of IndexVec::into_iter.\nReturn type of IndexVec::iter.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturns the argument unchanged.\nReturn the value at the given index.\nCalls U::from(self).\nCalls U::from(self).\nCalls U::from(self).\nConvert into an iterator over the indices as a sequence of …\nReturn result as a Vec<usize>. Conversion may or may not …\nReturns true if the length is 0.\nIterate over the indices as a sequence of usize values\nReturns the number of indices\nRandomly sample exactly amount distinct indices from …\nRandomly sample exactly amount distinct indices from …")