]>
Commit | Line | Data |
---|---|---|
0731742a | 1 | // Copyright 2018 Developers of the Rand project. |
b7449926 XL |
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::*; | |
416331ca | 17 | //! # let mut r = StdRng::from_rng(thread_rng()).unwrap(); |
b7449926 XL |
18 | //! # let _: f32 = r.gen(); |
19 | //! ``` | |
20 | ||
416331ca | 21 | #[doc(no_inline)] pub use crate::distributions::Distribution; |
dfeec247 XL |
22 | #[cfg(feature = "small_rng")] |
23 | #[doc(no_inline)] | |
24 | pub use crate::rngs::SmallRng; | |
416331ca | 25 | #[doc(no_inline)] pub use crate::rngs::StdRng; |
dfeec247 XL |
26 | #[doc(no_inline)] |
27 | #[cfg(feature = "std")] | |
28 | pub use crate::rngs::ThreadRng; | |
29 | #[doc(no_inline)] pub use crate::seq::{IteratorRandom, SliceRandom}; | |
30 | #[doc(no_inline)] | |
31 | #[cfg(feature = "std")] | |
32 | pub use crate::{random, thread_rng}; | |
33 | #[doc(no_inline)] pub use crate::{CryptoRng, Rng, RngCore, SeedableRng}; |