about summary refs log tree commit diff
path: root/library/core/src/random.rs
AgeCommit message (Collapse)AuthorLines
2025-07-11random: Provide a `Distribution<T>` traitJosh Triplett-27/+20
This will let people make calls like random(1..=6), and allows for future expansion to non-uniform distributions, as well as floating-point. For now, this is only implemented for `RangeFull`, to get the interface in place. Subsequent commits will implement it for other range types.
2025-07-09random: Add comment on `RandomSource::fill_bytes` about multiple callsJosh Triplett-0/+5
This allows efficient implementations for random sources that generate a word at a time.
2024-09-23random: add tracking issue, address other commentsjoboet-2/+2
2024-09-23std: implement the `random` featurejoboet-0/+62
Implements the ACP https://github.com/rust-lang/libs-team/issues/393.