Skip to content

Implement Debug for all public types #130

@abonander

Description

@abonander

Extends/Supersedes #118

I'm creating this issue in a metabug format so that it may be used as such.

This is one major shortcoming of this crate that is relatively trivial to address. Most of these can probably just be derived.

For wrapper types (such as ReseedingRng and Generator), we should consider using specialization to add default impls for when the inner types are not Debug. Rust-lang crates are exempt from stability restrictions, correct?

RNG types

The major question to answer here is if we should reveal implementation details of these RNGs, such as seed or state variables, or just have them completely opaque.

  • ChaChaRng
  • Isaac[64]Rng
  • ReadRng
  • ReseedingRng
  • StdRng
  • ThreadRng
  • XorShiftRng

distributions module

To avoid listing all the types, I'm just going to mainly list the modules.

#120 addresses the types in these modules already, but not the loose types. Not much movement there, though.

  • exponential
  • gamma
  • normal
  • range

Loose types in this module:

  • RandSample
  • Weighted
  • WeightedChoice

Misc. Types

  • AsciiGenerator
  • Closed01
  • Generator
  • Open01

Pinging @alexcrichton as most recently active team member on this repo. Any input or anything I missed?

I may shortly start to issue PRs addressing each of these areas piecemeal (to avoid needing review of one massive PR). But mainly we should discuss the question of the implementation details on the RNGs themselves.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions