Trait quickcheck::Arbitrary
[−]
[src]
pub trait Arbitrary: Clone + Send + 'static { fn arbitrary<G: Gen>(g: &mut G) -> Self; fn shrink(&self) -> Box<Iterator<Item = Self>> { ... } }
Arbitrary
describes types whose values can be randomly generated and
shrunk.
Aside from shrinking, Arbitrary
is different from the std::Rand
trait
in that it uses a Gen
to control the distribution of random values.
As of now, all types that implement Arbitrary
must also implement
Clone
. (I'm not sure if this is a permanent restriction.)
They must also be sendable and static since every test is run in its own
thread using thread::Builder::spawn
, which requires the Send + 'static
bounds.
Required Methods
Provided Methods
Implementations on Foreign Types
impl Arbitrary for ()
[src]
impl Arbitrary for ()
impl Arbitrary for bool
[src]
impl Arbitrary for bool
impl<A: Arbitrary> Arbitrary for Option<A>
[src]
impl<A: Arbitrary> Arbitrary for Option<A>
impl<A: Arbitrary, B: Arbitrary> Arbitrary for Result<A, B>
[src]
impl<A: Arbitrary, B: Arbitrary> Arbitrary for Result<A, B>
impl<A: Arbitrary> Arbitrary for (A,)
[src]
impl<A: Arbitrary> Arbitrary for (A,)
impl<A: Arbitrary, B: Arbitrary> Arbitrary for (A, B)
[src]
impl<A: Arbitrary, B: Arbitrary> Arbitrary for (A, B)
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary> Arbitrary for (A, B, C)
[src]
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary> Arbitrary for (A, B, C)
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary, D: Arbitrary> Arbitrary for (A, B, C, D)
[src]
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary, D: Arbitrary> Arbitrary for (A, B, C, D)
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary, D: Arbitrary, E: Arbitrary> Arbitrary for (A, B, C, D, E)
[src]
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary, D: Arbitrary, E: Arbitrary> Arbitrary for (A, B, C, D, E)
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary, D: Arbitrary, E: Arbitrary, F: Arbitrary> Arbitrary for (A, B, C, D, E, F)
[src]
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary, D: Arbitrary, E: Arbitrary, F: Arbitrary> Arbitrary for (A, B, C, D, E, F)
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary, D: Arbitrary, E: Arbitrary, F: Arbitrary, G: Arbitrary> Arbitrary for (A, B, C, D, E, F, G)
[src]
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary, D: Arbitrary, E: Arbitrary, F: Arbitrary, G: Arbitrary> Arbitrary for (A, B, C, D, E, F, G)
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary, D: Arbitrary, E: Arbitrary, F: Arbitrary, G: Arbitrary, H: Arbitrary> Arbitrary for (A, B, C, D, E, F, G, H)
[src]
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary, D: Arbitrary, E: Arbitrary, F: Arbitrary, G: Arbitrary, H: Arbitrary> Arbitrary for (A, B, C, D, E, F, G, H)
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary, D: Arbitrary, E: Arbitrary, F: Arbitrary, G: Arbitrary, H: Arbitrary, I: Arbitrary> Arbitrary for (A, B, C, D, E, F, G, H, I)
[src]
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary, D: Arbitrary, E: Arbitrary, F: Arbitrary, G: Arbitrary, H: Arbitrary, I: Arbitrary> Arbitrary for (A, B, C, D, E, F, G, H, I)
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary, D: Arbitrary, E: Arbitrary, F: Arbitrary, G: Arbitrary, H: Arbitrary, I: Arbitrary, J: Arbitrary> Arbitrary for (A, B, C, D, E, F, G, H, I, J)
[src]
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary, D: Arbitrary, E: Arbitrary, F: Arbitrary, G: Arbitrary, H: Arbitrary, I: Arbitrary, J: Arbitrary> Arbitrary for (A, B, C, D, E, F, G, H, I, J)
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary, D: Arbitrary, E: Arbitrary, F: Arbitrary, G: Arbitrary, H: Arbitrary, I: Arbitrary, J: Arbitrary, K: Arbitrary> Arbitrary for (A, B, C, D, E, F, G, H, I, J, K)
[src]
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary, D: Arbitrary, E: Arbitrary, F: Arbitrary, G: Arbitrary, H: Arbitrary, I: Arbitrary, J: Arbitrary, K: Arbitrary> Arbitrary for (A, B, C, D, E, F, G, H, I, J, K)
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary, D: Arbitrary, E: Arbitrary, F: Arbitrary, G: Arbitrary, H: Arbitrary, I: Arbitrary, J: Arbitrary, K: Arbitrary, L: Arbitrary> Arbitrary for (A, B, C, D, E, F, G, H, I, J, K, L)
[src]
impl<A: Arbitrary, B: Arbitrary, C: Arbitrary, D: Arbitrary, E: Arbitrary, F: Arbitrary, G: Arbitrary, H: Arbitrary, I: Arbitrary, J: Arbitrary, K: Arbitrary, L: Arbitrary> Arbitrary for (A, B, C, D, E, F, G, H, I, J, K, L)
impl<A: Arbitrary> Arbitrary for Vec<A>
[src]
impl<A: Arbitrary> Arbitrary for Vec<A>
impl<K: Arbitrary + Ord, V: Arbitrary> Arbitrary for BTreeMap<K, V>
[src]
impl<K: Arbitrary + Ord, V: Arbitrary> Arbitrary for BTreeMap<K, V>
impl<K: Arbitrary + Eq + Hash, V: Arbitrary> Arbitrary for HashMap<K, V>
[src]
impl<K: Arbitrary + Eq + Hash, V: Arbitrary> Arbitrary for HashMap<K, V>
impl<T: Arbitrary + Ord> Arbitrary for BTreeSet<T>
[src]
impl<T: Arbitrary + Ord> Arbitrary for BTreeSet<T>
impl<T: Arbitrary + Ord> Arbitrary for BinaryHeap<T>
[src]
impl<T: Arbitrary + Ord> Arbitrary for BinaryHeap<T>
impl<T: Arbitrary + Eq + Hash> Arbitrary for HashSet<T>
[src]
impl<T: Arbitrary + Eq + Hash> Arbitrary for HashSet<T>
impl<T: Arbitrary> Arbitrary for LinkedList<T>
[src]
impl<T: Arbitrary> Arbitrary for LinkedList<T>
impl<T: Arbitrary> Arbitrary for VecDeque<T>
[src]
impl<T: Arbitrary> Arbitrary for VecDeque<T>
impl Arbitrary for String
[src]
impl Arbitrary for String
impl Arbitrary for char
[src]
impl Arbitrary for char
impl Arbitrary for usize
[src]
impl Arbitrary for usize
impl Arbitrary for u8
[src]
impl Arbitrary for u8
impl Arbitrary for u16
[src]
impl Arbitrary for u16
impl Arbitrary for u32
[src]
impl Arbitrary for u32
impl Arbitrary for u64
[src]
impl Arbitrary for u64
impl Arbitrary for isize
[src]
impl Arbitrary for isize
impl Arbitrary for i8
[src]
impl Arbitrary for i8
impl Arbitrary for i16
[src]
impl Arbitrary for i16
impl Arbitrary for i32
[src]
impl Arbitrary for i32
impl Arbitrary for i64
[src]
impl Arbitrary for i64
impl Arbitrary for f32
[src]
impl Arbitrary for f32
impl Arbitrary for f64
[src]
impl Arbitrary for f64
impl<T: Arbitrary + Clone + PartialOrd> Arbitrary for Range<T>
[src]
impl<T: Arbitrary + Clone + PartialOrd> Arbitrary for Range<T>
impl<T: Arbitrary + Clone + PartialOrd> Arbitrary for RangeFrom<T>
[src]
impl<T: Arbitrary + Clone + PartialOrd> Arbitrary for RangeFrom<T>
impl<T: Arbitrary + Clone + PartialOrd> Arbitrary for RangeTo<T>
[src]
impl<T: Arbitrary + Clone + PartialOrd> Arbitrary for RangeTo<T>
impl Arbitrary for RangeFull
[src]
impl Arbitrary for RangeFull
impl Arbitrary for Duration
[src]
impl Arbitrary for Duration