Struct diceprop::Set[][src]

pub struct Set<'a, S: Debug, D: DieOnce<S> + 'a> {
    pub name: &'a str,
    pub elem_die: D,
    // some fields omitted
}
Expand description

A mathematical set that can be used to randomly choose Vars.

The elements of the set are represented by the generator. The set contains all elements that the generator could possibly generate.

Fields

name: &'a str

The name of the set.

elem_die: D

A generator for the elements of the set.

Implementations

Returns a generator that chooses a single variable from the set.

Returns a Set with the same name and a reference to the original generator.

Returns a generator that chooses N variables from the set.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.