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 --- .../target/doc/rand/distributions/trait.DistString.html | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/trait.DistString.html (limited to 'rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/trait.DistString.html') diff --git a/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/trait.DistString.html b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/trait.DistString.html new file mode 100644 index 0000000..8b31106 --- /dev/null +++ b/rust/theBook/chapter-2-guessing-game/guessing_game/target/doc/rand/distributions/trait.DistString.html @@ -0,0 +1,13 @@ +DistString in rand::distributions - Rust
pub trait DistString {
+    fn append_string<R: Rng + ?Sized>(
        &self,
        rng: &mut R,
        string: &mut String,
        len: usize
    ); + + fn sample_string<R: Rng + ?Sized>(&self, rng: &mut R, len: usize) -> String { ... } +}
Expand description

String sampler

+

Sampling a String of random characters is not quite the same as collecting +a sequence of chars. This trait contains some helpers.

+

Required Methods

Append len random chars to string

+

Provided Methods

Generate a String of len random chars

+

Implementors

Note: the String is potentially left with excess capacity; optionally the +user may call string.shrink_to_fit() afterwards.

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