Struct proptest::num::f32::Any[][src]

#[must_use = "strategies do nothing unless used"]pub struct Any(_);

Strategies which produce floating-point values from particular classes. See the various Any-typed constants in this module.

Note that this usage is fairly advanced and primarily useful to implementors of algorithms that need to handle wild values in a particular way. For testing things like graphics processing or game physics, simply using ranges (e.g., -1.0..2.0) will often be more practical.

Any can be OR'ed to combine multiple classes. For example, POSITIVE | INFINITE will generate arbitrary positive, non-NaN floats, including positive infinity (but not negative infinity, of course).

If neither POSITIVE nor NEGATIVE has been OR'ed into an Any but a type to be generated requires a sign, POSITIVE is assumed. If no classes are OR'ed into an Any (i.e., only POSITIVE and/or NEGATIVE are given), NORMAL is assumed.

The various float classes are assigned fixed weights for generation which are believed to be reasonable for most applications. Roughly:

Trait Implementations

impl BitOr<Any> for Any[src]

type Output = Self

The resulting type after applying the | operator.

impl BitOrAssign<Any> for Any[src]

impl Clone for Any[src]

impl Copy for Any[src]

impl Debug for Any[src]

impl Strategy for Any[src]

type Tree = BinarySearch

The value tree generated by this Strategy.

type Value = f32

The type of value used by functions under test generated by this Strategy. Read more

Auto Trait Implementations

impl Send for Any[src]

impl Sync for Any[src]

impl Unpin for Any[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,