@@ -91,15 +91,16 @@ pub mod le;
91
91
/// It is recommended that implementations also implement:
92
92
///
93
93
/// - `Debug` with a custom implementation which *does not* print any internal
94
- /// state (at least, [`CryptoRng`]s should not risk leaking state through Debug)
94
+ /// state (at least, [`CryptoRng`]s should not risk leaking state through
95
+ /// `Debug`).
95
96
/// - `Serialize` and `Deserialize` (from Serde), preferably making Serde
96
- /// support optional at the crate level in PRNG libs
97
- /// - `Clone` if, and only if, the clone will have identical output to the
98
- /// original (i.e. all deterministic PRNGs but not external generators)
99
- /// - *never * implement `Copy` (accidental copies may cause repeated values)
100
- /// - also *do not* implement `Default`, but instead implement `SeedableRng`
101
- /// thus allowing use of `rand::NewRng` (which is automatically implemented)
102
- /// - `Eq` and `PartialEq` could be implemented, but are probably not useful
97
+ /// support optional at the crate level in PRNG libs.
98
+ /// - `Clone`, if possible.
99
+ /// - *never* implement `Copy` (accidental copies may cause repeated values).
100
+ /// - *do not * implement `Default` for pseudorandom generators, but instead
101
+ /// implement [`SeedableRng`], to guide users towards proper seeding.
102
+ /// External / hardware RNGs can choose to implement `Default`.
103
+ /// - `Eq` and `PartialEq` could be implemented, but are probably not useful.
103
104
///
104
105
/// # Example
105
106
///
0 commit comments