Struct proptest_arbitrary::SizeBounds [] [src]

pub struct SizeBounds(_);

The minimum and maximum bounds on the size of a collection. The interval must form a subset of [0, std::usize::MAX).

Methods

impl SizeBounds
[src]

[src]

Creates a SizeBounds from a Range<usize>.

[src]

Merges self together with some other argument producing a product type expected by some impelementations of A: Arbitrary<'a> in A::Parameters. This can be more ergonomic to work with and may help type inference.

[src]

Merges self together with some other argument generated with a default value producing a product type expected by some impelementations of A: Arbitrary<'a> in A::Parameters. This can be more ergonomic to work with and may help type inference.

Trait Implementations

impl Default for SizeBounds
[src]

[src]

Returns the "default value" for a type. Read more

impl From<(usize, usize)> for SizeBounds
[src]

Given (low: usize, high: usize), then a range [low..high) is the result.

[src]

Performs the conversion.

impl From<usize> for SizeBounds
[src]

Given exact, then a range [exact..exact + 1) is the result.

[src]

Performs the conversion.

impl From<RangeTo<usize>> for SizeBounds
[src]

Given ..high, then a range [0..high) is the result.

[src]

Performs the conversion.

impl Add<usize> for SizeBounds
[src]

Adds usize to both start and end of the bounds.

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl<'a> Arbitrary<'a> for SizeBounds
[src]

The type of [ValueTree] used for Self's [Strategy]. Read more

The type of parameters that [arbitrary_with] accepts for configuration of the generated [Strategy]. Parameters must implement [Default]. Read more

The type of [Strategy] used to generate values of type Self. Read more

[src]

Generates a [Strategy] for producing arbitrary values of type the implementing type (Self). The strategy is passed the arguments given in args. Read more

[src]

Generates a [Strategy] for producing arbitrary values of type the implementing type (Self). Read more

impl Clone for SizeBounds
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for SizeBounds
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for SizeBounds
[src]

impl Hash for SizeBounds
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for SizeBounds
[src]

[src]

Formats the value using the given formatter.

impl From<Range<usize>> for SizeBounds
[src]

[src]

Performs the conversion.

impl Generic for SizeBounds
[src]

The generic representation type

[src]

Go from something to Repr

[src]

Go from Repr to something

[src]

From one type to another using a type with a compatible generic representation