@@ -257,12 +257,16 @@ use core::mem;
257
257
#[ cfg( feature="std" ) ] use std:: io;
258
258
#[ cfg( feature="std" ) ] use std:: rc:: Rc ;
259
259
260
+ // external rngs
260
261
pub use jitter:: JitterRng ;
261
262
#[ cfg( feature="std" ) ] pub use os:: OsRng ;
262
263
264
+ // pseudo rngs
263
265
pub use isaac:: { IsaacRng , Isaac64Rng } ;
264
266
pub use chacha:: ChaChaRng ;
267
+ pub use prng:: XorShiftRng ;
265
268
269
+ // local use declarations
266
270
#[ cfg( target_pointer_width = "32" ) ]
267
271
use prng:: IsaacRng as IsaacWordRng ;
268
272
#[ cfg( target_pointer_width = "64" ) ]
@@ -271,16 +275,13 @@ use prng::Isaac64Rng as IsaacWordRng;
271
275
use distributions:: { Range , IndependentSample } ;
272
276
use distributions:: range:: SampleRange ;
273
277
274
- pub use prng:: XorShiftRng ;
275
-
278
+ // public modules
276
279
pub mod distributions;
277
- pub mod reseeding;
278
- mod rand_impls;
279
280
pub mod jitter;
280
281
#[ cfg( feature="std" ) ] pub mod os;
281
282
#[ cfg( feature="std" ) ] pub mod read;
283
+ pub mod reseeding;
282
284
#[ cfg( any( feature="std" , feature = "alloc" ) ) ] pub mod seq;
283
- mod prng;
284
285
285
286
// These tiny modules are here to avoid API breakage, probably only temporarily
286
287
pub mod chacha {
@@ -292,6 +293,11 @@ pub mod isaac {
292
293
pub use prng:: { IsaacRng , Isaac64Rng } ;
293
294
}
294
295
296
+ // private modules
297
+ mod rand_impls;
298
+ mod prng;
299
+
300
+
295
301
/// A type that can be randomly generated using an `Rng`.
296
302
///
297
303
/// ## Built-in Implementations
@@ -324,7 +330,6 @@ pub mod isaac {
324
330
/// independently, using its own `Rand` implementation.
325
331
/// * `Option<T>`: Returns `None` with probability 0.5; otherwise generates a
326
332
/// random `T` and returns `Some(T)`.
327
-
328
333
pub trait Rand : Sized {
329
334
/// Generates a random instance of this type using the specified source of
330
335
/// randomness.
0 commit comments