We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
RandomSource::fill_bytes
1 parent e3fccdd commit 4c94798Copy full SHA for 4c94798
library/core/src/random.rs
@@ -7,6 +7,11 @@
7
#[unstable(feature = "random", issue = "130703")]
8
pub trait RandomSource {
9
/// Fills `bytes` with random bytes.
10
+ ///
11
+ /// Note that calling `fill_bytes` multiple times is not equivalent to calling `fill_bytes` once
12
+ /// with a larger buffer. A `RandomSource` is allowed to return different bytes for those two
13
+ /// cases. For instance, this allows a `RandomSource` to generate a word at a time and throw
14
+ /// part of it away if not needed.
15
fn fill_bytes(&mut self, bytes: &mut [u8]);
16
}
17
0 commit comments