From 369d11587339ce74f8ebc76f2607fe55545eaf7d Mon Sep 17 00:00:00 2001 From: garhve Date: Tue, 20 Dec 2022 11:04:25 +0800 Subject: Build small project following the book --- .../guessing_game/target/doc/getrandom/fn.getrandom.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/fn.getrandom.html (limited to 'rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/fn.getrandom.html') diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/fn.getrandom.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/fn.getrandom.html new file mode 100644 index 0000000..955b469 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/getrandom/fn.getrandom.html @@ -0,0 +1,12 @@ +getrandom in getrandom - Rust
pub fn getrandom(dest: &mut [u8]) -> Result<(), Error>
Expand description

Fill dest with random bytes from the system’s preferred random number +source.

+

This function returns an error on any failure, including partial reads. We +make no guarantees regarding the contents of dest on error. If dest is +empty, getrandom immediately returns success, making no calls to the +underlying operating system.

+

Blocking is possible, at least during early boot; see module documentation.

+

In general, getrandom will be fast enough for interactive usage, though +significantly slower than a user-space CSPRNG; for the latter consider +rand::thread_rng.

+
\ No newline at end of file -- cgit v1.2.3-70-g09d2