Module suppositions::generators
[−]
[src]
This module describes how data gets generated from the underlying representation
in the suppositions::data
module.
Structs
BoolGenerator |
See |
CollectionGenerator |
See |
Const |
See |
FilterMapped | |
Filtered | |
FloatGenerator | |
InfoPoolGenerator |
See |
IntGenerator | |
LazyGenerator |
See |
Mapped |
See |
OneOfGenerator |
See |
OneOfSnoc |
Internal implementation for |
OneOfTerm |
Internal implementation for |
OptionalGenerator |
See |
ResultGenerator |
See |
UniformFloatGenerator |
See |
VecGenerator |
See |
WeightedCoinGenerator |
See |
Traits
Generator |
An object that can generate test data from an underlying data source. |
GeneratorObject |
Like |
GeneratorSized |
An extension trait that allows use of methods that assume Self has a known
size, like |
OneOfItem |
Internal implementation for |
Functions
booleans |
Generates boolean value with a 50% chance of being true. |
collections |
Generates a collection of the given type, populated with elements from the item generator. |
consts |
Always generates a clone of the given value. |
f32s |
Generates values that encompass all possible float values (positive and negative), including NaN, and sub-normal values. |
f64s |
Generates values that encompass all possible float values (positive and negative), including NaN, and sub-normal values. |
find_minimal |
Find the smalltest |
i16s |
A generator that generates the full range of the specified type. |
i32s |
A generator that generates the full range of the specified type. |
i64s |
A generator that generates the full range of the specified type. |
i8s |
A generator that generates the full range of the specified type. |
info_pools |
Randomly generates an info-pool (mostly used for testing generators). |
isizes |
A generator that generates the full range of the specified type. |
lazy |
Returns a lazily evaluated generator. The |
one_of |
Allows the user to use one of a set of alternative generators. Often useful when you need to generate elements of an enum. |
optional |
Generates an Optional<_> value with a 50% chance of |
result |
Generates either an okay value from |
u16s |
A generator that generates integers of the specified type. |
u32s |
A generator that generates integers of the specified type. |
u64s |
A generator that generates integers of the specified type. |
u8s |
A generator that generates integers of the specified type. |
uniform_f32s |
Generates values that are uniformly distributed, such that the output value x satisifes 0.0 <= x < 1.0 |
uniform_f64s |
Generates values that are uniformly distributed, such that the output value x satisifes 0.0 <= x < 1.0 |
usizes |
A generator that generates integers of the specified type. |
vecs |
Generates vectors with items given by |
weighted_coin |
Generates a boolean with the specified probability (0.0 <= p <= 1.0) of being true. |
Type Definitions
Maybe |
A convenience alias for generators that use the pool. |