d618bd7cc96f88e2b71f790d3a8f75a7cca4956d
Capture a short backlog of ergonomy improvements for the public API so the ideas don't get lost between sessions. This is a planning document only — no code changes, and nothing here is committed to as a roadmap. Items recorded: - Thread-local global helpers (e.g. `random_u64()`) to avoid threading an `OsRandom` through call sites for one-off uses. - `gen_range` for all integer widths and `Range`/`RangeInclusive` overloads; today only `gen_range_u32` exists. - `fill_bytes(&mut [u8])` so callers don't need to bring `io::Read` into scope just to fill a buffer. - `bool()` and `f64()` (unit interval) helpers. - Generic `shuffle(&mut [T])` and `choose<T>(&[T]) -> &T`, not just byte slices. - Accept `&str` alphabets directly and drop the ASCII assert by iterating `chars()` instead of bytes. - Loosen `&mut self` to `&self` (interior buffering) or impl `Clone`, so multiple call sites can share a handle without borrow-checker friction. - Preset constructors: `OsRandom::password(len)`, `::hex(len)`, `::token(len)`.
Description
Languages
Rust
100%