1 // Copyright 2018 Developers of the Rand project.
2 //
3 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4 // https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5 // <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6 // option. This file may not be copied, modified, or distributed
7 // except according to those terms.
8 
9 //! Convenience re-export of common members
10 //!
11 //! Like the standard library's prelude, this module simplifies importing of
12 //! common items. Unlike the standard prelude, the contents of this module must
13 //! be imported manually:
14 //!
15 //! ```
16 //! use rand::prelude::*;
17 //! # let _ = StdRng::from_entropy();
18 //! # let mut r = SmallRng::from_rng(thread_rng()).unwrap();
19 //! # let _: f32 = r.gen();
20 //! ```
21 
22 #[doc(no_inline)] pub use distributions::Distribution;
23 #[doc(no_inline)] pub use rngs::{SmallRng, StdRng};
24 #[doc(no_inline)] #[cfg(feature="std")] pub use rngs::ThreadRng;
25 #[doc(no_inline)] pub use {Rng, RngCore, CryptoRng, SeedableRng};
26 #[doc(no_inline)] #[cfg(feature="std")] pub use {FromEntropy, random, thread_rng};
27 #[doc(no_inline)] pub use seq::{SliceRandom, IteratorRandom};
28