From b722b68655ea3f4fa35e4765924db6dfabb95844 Mon Sep 17 00:00:00 2001 From: Daniel Glus Date: Sun, 19 Jan 2020 18:27:17 -0500 Subject: [PATCH] doc: document Gen::size --- src/arbitrary.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/arbitrary.rs b/src/arbitrary.rs index 94a81ad..4693ce8 100644 --- a/src/arbitrary.rs +++ b/src/arbitrary.rs @@ -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; }