Struct proptest::collection::SizeRange[][src]

pub struct SizeRange(_);

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

The Default is 0..100.

Methods

impl SizeRange
[src]

Creates a SizeBounds from a RangeInclusive<usize>.

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

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

Trait Implementations

impl Arbitrary for SizeRange
[src]

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

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

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

impl Default for SizeRange
[src]

Constructs a SizeRange equivalent to size_range(0..100).

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

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

Performs the conversion.

impl From<usize> for SizeRange
[src]

Given exact, then a size range of [exact, exact] is the result.

Performs the conversion.

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

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

Performs the conversion.

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

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

Performs the conversion.

impl From<RangeInclusive<usize>> for SizeRange
[src]

Given low ..= high, then a size range [low, high] is the result.

Performs the conversion.

impl From<RangeToInclusive<usize>> for SizeRange
[src]

Given ..=high, then a size range [0, high] is the result.

Performs the conversion.

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

Given a size range [low, high], then a rangelow..(high + 1) is returned. This will panic if high == usize::MAX.

Performs the conversion.

impl From<SizeRange> for RangeInclusive<usize>
[src]

Given a size range [low, high], then a range low..=high is returned.

Performs the conversion.

impl Add<usize> for SizeRange
[src]

Adds usize to both start and end of the bounds.

Panics if adding to either end overflows usize.

The resulting type after applying the + operator.

Performs the + operation.

impl Clone for SizeRange
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for SizeRange
[src]

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

This method tests for !=.

impl Eq for SizeRange
[src]

impl Hash for SizeRange
[src]

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

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

impl Debug for SizeRange
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for SizeRange

impl Sync for SizeRange