Add doc aliases for DefaultRandomSource, for people looking for randomness

`getrandom` is both a crate for this and the name of the underlying
syscall on various OSes. `getentropy` and `arc4random` are common
library calls on various OSes.
This commit is contained in:
Josh Triplett
2026-05-31 13:54:35 -07:00
parent 9c25035440
commit f65c5656ff

View File

@@ -56,6 +56,7 @@ use crate::sys::random as sys;
///
/// [`getrandom`]: https://www.man7.org/linux/man-pages/man2/getrandom.2.html
/// [`/dev/urandom`]: https://www.man7.org/linux/man-pages/man4/random.4.html
#[doc(alias = "getrandom", alias = "getentropy", alias = "arc4random")]
#[derive(Default, Debug, Clone, Copy)]
#[unstable(feature = "random", issue = "130703")]
pub struct DefaultRandomSource;