diff --git a/IDEAS.md b/IDEAS.md new file mode 100644 index 0000000..f1f2be2 --- /dev/null +++ b/IDEAS.md @@ -0,0 +1,15 @@ +# Ergonomy ideas + +- `Default` / `thread_local` global: `ez_urandom::random_u64()` without + constructing or threading an `OsRandom`. +- `gen_range` for all int widths (currently only `u32`) plus a `Range` / + `RangeInclusive` overload. +- `fill_bytes(&mut [u8])` convenience so callers don't need to import + `io::Read`. +- `bool()` / `f64()` (unit interval) helpers. +- `shuffle(&mut [T])` and `choose(&[T]) -> &T` — generic, not just bytes. +- Accept a `&str` alphabet directly (not just `&[u8]`) and drop the ASCII + assert by iterating `chars()`. +- Loosen `&mut self` to `&self` via interior buffering, or impl `Clone`, so + multiple call sites don't fight the borrow checker. +- Builder / presets: `OsRandom::password(len)`, `::hex(len)`, `::token(len)`.