Skip to content

impl SampleRange for user types #146

@budziq

Description

@budziq

Hi I would like to bump this problem already mentioned in
#114
#82

How does one exactly implement SampleRange for user types? I was just about to write a snippet for rand on https://brson.github.io/rust-cookbook/ and while implementing Rand is enough to get some random sample, I see no way to implement SampleRange due to Range being private. This pretty much defeats the purpose of SampleRange trait as the user needs to fit the values into required range by hand.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-docsDocumentationE-questionParticipation: opinions wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions