Skip to content

Commit

Permalink
doc: document Gen::size
Browse files Browse the repository at this point in the history
PR #255
  • Loading branch information
enterprisey authored and BurntSushi committed Jan 22, 2020
1 parent d771da1 commit 4a300c5
Showing 1 changed file with 4 additions and 0 deletions.
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.
fn size(&self) -> usize;
}

Expand Down

0 comments on commit 4a300c5

Please sign in to comment.