-
Notifications
You must be signed in to change notification settings - Fork 432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracker: proposed RngCore changes #1261
Comments
Further to the topic of
|
@newpavlov proposed using |
This is response to #1273 (comment).
I think it's worth to keep The current design of One issue with your proposed |
Right, this is neither a block-RNG nor a word ( |
Given RFC 1672 we could do something like this: pub trait WordRng {
type Word;
fn next(&mut self) -> Self::Word;
}
impl<W: WordRng<Word = u32>> RngCore for W { ... }
impl<W: WordRng<Word = u64>> RngCore for W { ... }
// keep trait BlockRngCore and
// impl<R: BlockRngCore<Item = u32>> RngCore for BlockRng<R> { ... } Drawback: it still doesn't let algorithms depend on the RNG word size. Variant: include |
Related, but I think the traits need to stay separate: #1285 reasons that RNGs with hidden/platform-dependent internals like My proposed redesign moves |
@newpavlov commented:
It may be worth trying this.
The text was updated successfully, but these errors were encountered: