Skip to content
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

Document Gen::size #255

Merged
merged 1 commit into from
Jan 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/arbitrary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ use rand::{self, Rng, RngCore};
/// A value with type satisfying the `Gen` trait can be constructed with the
/// `gen` function in this crate.
pub trait Gen: RngCore {
/// Returns the `size` parameter used by this `Gen`, which controls the size
/// of random values generated. For example, it specifies the maximum length
/// of a randomly generated vector and also will specify the maximum
/// magnitude of a randomly generated number.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just so you're aware, it looks like the latter part of this sentence will be changed once #240 is merged (and this will be considered a breaking change). But this is correct as of today!

fn size(&self) -> usize;
}

Expand Down