File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ use rand_core::Rng;
1818/// User-level interface for RNGs
1919///
2020/// [`Rng`] is the `dyn`-safe implementation-level interface for Random
21- /// (Number) Generators. This trait, `Rng `, provides a user-level interface on
22- /// RNGs. It is implemented automatically for any ` R: Rng` .
21+ /// (Number) Generators. This trait, `RngExt `, provides a user-level interface
22+ /// on RNGs. It is implemented automatically for any <code> R: [ Rng][]</code> .
2323///
2424/// This trait must usually be brought into scope via `use rand::RngExt;` or
2525/// `use rand::prelude::*;`.
Original file line number Diff line number Diff line change 6767//! ## Traits and functionality
6868//!
6969//! All generators implement [`TryRng`]. Most implement [`Rng`] (i.e.
70- //! `TryRng<Error = Infallible>`) and thus also implement [`Rng`][crate::Rng ].
70+ //! `TryRng<Error = Infallible>`) and thus also implement [`RngExt` ].
7171//! See also the [Random Values] chapter in the book.
7272//!
7373//! Secure RNGs may additionally implement the [`CryptoRng`] trait.
8080//! [Types of generators]: https://rust-random.github.io/book/guide-gen.html
8181//! [Our RNGs]: https://rust-random.github.io/book/guide-rngs.html
8282//! [Random Values]: https://rust-random.github.io/book/guide-values.html
83- //! [`Rng `]: crate::RngExt
83+ //! [`RngExt `]: crate::RngExt
8484//! [`TryRng`]: crate::TryRng
8585//! [`Rng`]: crate::Rng
8686//! [`CryptoRng`]: crate::CryptoRng
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ type Rng = super::xoshiro256plusplus::Xoshiro256PlusPlus;
6161///
6262/// ## Generation
6363///
64- /// The generators implements [`Rng`] and thus also [`Rng`][crate::Rng ].
64+ /// The generator implements [`Rng`] and thus also [`RngExt` ].
6565/// See also the [Random Values] chapter in the book.
6666///
6767/// [portable]: https://rust-random.github.io/book/crate-reprod.html
@@ -73,6 +73,7 @@ type Rng = super::xoshiro256plusplus::Xoshiro256PlusPlus;
7373/// [rand_xoshiro]: https://crates.io/crates/rand_xoshiro
7474/// [`rand_seeder`]: https://docs.rs/rand_seeder/latest/rand_seeder/
7575/// [`Rng`]: rand_core::Rng
76+ /// [`RngExt`]: crate::RngExt
7677/// [`rand::make_rng()`]: crate::make_rng
7778#[ derive( Clone , Debug , PartialEq , Eq ) ]
7879pub struct SmallRng ( Rng ) ;
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ use chacha20::ChaCha12Rng as Rng;
5555///
5656/// ## Generation
5757///
58- /// The generators implements [`Rng`] and thus also [`Rng`][crate::Rng ].
58+ /// The generator implements [`Rng`] and thus also [`RngExt` ].
5959/// See also the [Random Values] chapter in the book.
6060///
6161/// [portable]: https://rust-random.github.io/book/crate-reprod.html
@@ -66,6 +66,7 @@ use chacha20::ChaCha12Rng as Rng;
6666/// [chacha20]: https://crates.io/crates/chacha20
6767/// [rand issue]: https://github.com/rust-random/rand/issues/932
6868/// [`Rng`]: rand_core::Rng
69+ /// [`RngExt`]: crate::RngExt
6970/// [`rand::make_rng()`]: crate::make_rng
7071/// [`rand::rng()`]: crate::rng
7172#[ derive( Debug , PartialEq , Eq ) ]
You can’t perform that action at this time.
0 commit comments