# [−][src]Trait arbitrary::Arbitrary

Generate arbitrary structured values from raw, unstructured data.

The `Arbitrary`

trait allows you to generate valid structured values, like
`HashMap`

s, or ASTs, or `MyTomlConfig`

, or any other data structure from
raw, unstructured bytes provided by a fuzzer. It also features built-in
shrinking, so that if you find a test case that triggers a bug, you can find
the smallest, most easiest-to-understand test case that still triggers that
bug.

# Deriving `Arbitrary`

Automatically deriving the `Arbitrary`

trait is the recommended way to
implement `Arbitrary`

for your types.

Using the custom derive requires that you enable the `"derive"`

cargo
feature in your `Cargo.toml`

:

```
[dependencies]
arbitrary = { version = "0.2.0", features = ["derive"] }
```

Then, you add the `#[derive(Arbitrary)]`

annotation to your `struct`

or
`enum`

type definition:

use arbitrary::Arbitrary; use std::collections::HashSet; #[derive(Arbitrary)] pub struct AddressBook { friends: HashSet<Friend>, } #[derive(Arbitrary, Hash, Eq, PartialEq)] pub enum Friend { Buddy { name: String }, Pal { age: usize }, }

Every member of the `struct`

or `enum`

must also implement `Arbitrary`

.

# Implementing `Arbitrary`

By Hand

Implementing `Arbitrary`

mostly involves nested calls to other `Arbitrary`

arbitrary implementations for each of your `struct`

or `enum`

's members. But
sometimes you need some amount of raw data, or you need to generate a
variably-sized collection type, or you something of that sort. The
`Unstructured`

type helps you with these tasks.

use arbitrary::{Arbitrary, Result, Unstructured}; impl<T> Arbitrary for MyCollection<T> where T: Arbitrary, { fn arbitrary(u: &mut Unstructured<'_>) -> Result<Self> { // Get the number of `T`s we should insert into our collection. let len = u.arbitrary_len::<T>()?; // And then create a collection of that length! let mut my_collection = MyCollection::with_capacity(len); for _ in 0..len { let element = T::arbitrary(u)?; my_collection.insert(element); } Ok(my_collection) } }

## Required methods

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

Generate an arbitrary value of `Self`

from the given unstructured data.

Calling `Arbitrary::arbitrary`

requires that you have some raw data,
perhaps given to you by a fuzzer like AFL or libFuzzer. You wrap this
raw data in an `Unstructured`

, and then you can call `<MyType as Arbitrary>::arbitrary`

to construct an arbitrary instance of `MyType`

from that unstuctured data.

Implementation may return an error if there is not enough data to
construct a full instance of `Self`

. This is generally OK: it is better
to exit early and get the fuzzer to provide more input data, than it is
to generate default values in place of the missing data, which would
bias the distribution of generated values, and ultimately make fuzzing
less efficient.

use arbitrary::{Arbitrary, Unstructured}; #[derive(Arbitrary)] pub struct MyType { // ... } // Get the raw data from the fuzzer or wherever else. let raw_data: &[u8] = get_raw_data_from_fuzzer(); // Wrap that raw data in an `Unstructured`. let mut unstructured = Unstructured::new(raw_data); // Generate an arbitrary instance of `MyType` and do stuff with it. if let Ok(value) = MyType::arbitrary(&mut unstructured) { do_stuff(value); }

See also the documentation for `Unstructured`

.

## Provided methods

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

Generate an arbitrary value of `Self`

from the entirety of the given unstructured data.

This is similar to Arbitrary::arbitrary, however it assumes that it is the
last consumer of the given data, and is thus able to consume it all if it needs.
See also the documentation for `Unstructured`

.

`fn size_hint() -> (usize, Option<usize>)`

Get a size hint for how many bytes out of an `Unstructured`

this type
needs to construct itself.

This is useful for determining how many elements we should insert when creating an arbitrary collection.

The return value is similar to
`Iterator::size_hint`

: it returns a tuple where
the first element is a lower bound on the number of bytes required, and
the second element is an optional upper bound.

The default implementation return `(0, None)`

which is correct for any
type, but not ultimately that useful. Using `#[derive(Arbitrary)]`

will
create a better implementation. If you are writing an `Arbitrary`

implementation by hand, and your type can be part of a dynamically sized
collection (such as `Vec`

), you are strongly encouraged to override this
default with a better implementation. The
`size_hint`

module will help with this task.

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

Generate an iterator of derived values which are "smaller" than the
original `self`

instance.

You can use this to help find the smallest test case that reproduces a bug.

Using `#[derive(Arbitrary)]`

will automatically implement shrinking for
your type.

However, if you are implementing `Arbirary`

by hand and you want support
for shrinking your type, you must override the default provided
implementation of `shrink`

, which just returns an empty iterator. You
should try pretty hard to have your `shrink`

implementation return a
*lazy* iterator: one that computes the next value as it is needed,
rather than computing them up front when `shrink`

is first called.

## Implementations on Foreign Types

`impl Arbitrary for ()`

[src]

`fn arbitrary(_: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`impl Arbitrary for bool`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for u8`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for u16`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for u32`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for u64`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for u128`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for usize`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for i8`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for i16`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for i32`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for i64`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for i128`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for isize`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for f32`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for f64`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for char`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for AtomicBool`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for AtomicIsize`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for AtomicUsize`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl Arbitrary for Duration`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<A: Arbitrary> Arbitrary for Option<A>`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<A: Arbitrary, B: Arbitrary> Arbitrary for Result<A, B>`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<Z: Arbitrary> Arbitrary for (Z,)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<Z: Arbitrary, Y: Arbitrary> Arbitrary for (Z, Y)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<Y: Arbitrary, Z: Arbitrary, X: Arbitrary> Arbitrary for (Y, Z, X)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<X: Arbitrary, Y: Arbitrary, Z: Arbitrary, W: Arbitrary> Arbitrary for (X, Y, Z, W)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, V: Arbitrary> Arbitrary for (W, X, Y, Z, V)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, U: Arbitrary> Arbitrary for (V, W, X, Y, Z, U)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, T: Arbitrary> Arbitrary for (U, V, W, X, Y, Z, T)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, S: Arbitrary> Arbitrary for (T, U, V, W, X, Y, Z, S)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<S: Arbitrary, T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, R: Arbitrary> Arbitrary for (S, T, U, V, W, X, Y, Z, R)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<R: Arbitrary, S: Arbitrary, T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, Q: Arbitrary> Arbitrary for (R, S, T, U, V, W, X, Y, Z, Q)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<Q: Arbitrary, R: Arbitrary, S: Arbitrary, T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, P: Arbitrary> Arbitrary for (Q, R, S, T, U, V, W, X, Y, Z, P)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<P: Arbitrary, Q: Arbitrary, R: Arbitrary, S: Arbitrary, T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, O: Arbitrary> Arbitrary for (P, Q, R, S, T, U, V, W, X, Y, Z, O)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<O: Arbitrary, P: Arbitrary, Q: Arbitrary, R: Arbitrary, S: Arbitrary, T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, N: Arbitrary> Arbitrary for (O, P, Q, R, S, T, U, V, W, X, Y, Z, N)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<N: Arbitrary, O: Arbitrary, P: Arbitrary, Q: Arbitrary, R: Arbitrary, S: Arbitrary, T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, M: Arbitrary> Arbitrary for (N, O, P, Q, R, S, T, U, V, W, X, Y, Z, M)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<M: Arbitrary, N: Arbitrary, O: Arbitrary, P: Arbitrary, Q: Arbitrary, R: Arbitrary, S: Arbitrary, T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, L: Arbitrary> Arbitrary for (M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, L)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<L: Arbitrary, M: Arbitrary, N: Arbitrary, O: Arbitrary, P: Arbitrary, Q: Arbitrary, R: Arbitrary, S: Arbitrary, T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, K: Arbitrary> Arbitrary for (L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, K)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<K: Arbitrary, L: Arbitrary, M: Arbitrary, N: Arbitrary, O: Arbitrary, P: Arbitrary, Q: Arbitrary, R: Arbitrary, S: Arbitrary, T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, J: Arbitrary> Arbitrary for (K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, J)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<J: Arbitrary, K: Arbitrary, L: Arbitrary, M: Arbitrary, N: Arbitrary, O: Arbitrary, P: Arbitrary, Q: Arbitrary, R: Arbitrary, S: Arbitrary, T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, I: Arbitrary> Arbitrary for (J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, I)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<I: Arbitrary, J: Arbitrary, K: Arbitrary, L: Arbitrary, M: Arbitrary, N: Arbitrary, O: Arbitrary, P: Arbitrary, Q: Arbitrary, R: Arbitrary, S: Arbitrary, T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, H: Arbitrary> Arbitrary for (I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, H)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<H: Arbitrary, I: Arbitrary, J: Arbitrary, K: Arbitrary, L: Arbitrary, M: Arbitrary, N: Arbitrary, O: Arbitrary, P: Arbitrary, Q: Arbitrary, R: Arbitrary, S: Arbitrary, T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, G: Arbitrary> Arbitrary for (H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, G)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<G: Arbitrary, H: Arbitrary, I: Arbitrary, J: Arbitrary, K: Arbitrary, L: Arbitrary, M: Arbitrary, N: Arbitrary, O: Arbitrary, P: Arbitrary, Q: Arbitrary, R: Arbitrary, S: Arbitrary, T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, F: Arbitrary> Arbitrary for (G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, F)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<F: Arbitrary, G: Arbitrary, H: Arbitrary, I: Arbitrary, J: Arbitrary, K: Arbitrary, L: Arbitrary, M: Arbitrary, N: Arbitrary, O: Arbitrary, P: Arbitrary, Q: Arbitrary, R: Arbitrary, S: Arbitrary, T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, E: Arbitrary> Arbitrary for (F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, E)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<E: Arbitrary, F: Arbitrary, G: Arbitrary, H: Arbitrary, I: Arbitrary, J: Arbitrary, K: Arbitrary, L: Arbitrary, M: Arbitrary, N: Arbitrary, O: Arbitrary, P: Arbitrary, Q: Arbitrary, R: Arbitrary, S: Arbitrary, T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, D: Arbitrary> Arbitrary for (E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, D)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<D: Arbitrary, E: Arbitrary, F: Arbitrary, G: Arbitrary, H: Arbitrary, I: Arbitrary, J: Arbitrary, K: Arbitrary, L: Arbitrary, M: Arbitrary, N: Arbitrary, O: Arbitrary, P: Arbitrary, Q: Arbitrary, R: Arbitrary, S: Arbitrary, T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, C: Arbitrary> Arbitrary for (D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, C)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<C: Arbitrary, D: Arbitrary, E: Arbitrary, F: Arbitrary, G: Arbitrary, H: Arbitrary, I: Arbitrary, J: Arbitrary, K: Arbitrary, L: Arbitrary, M: Arbitrary, N: Arbitrary, O: Arbitrary, P: Arbitrary, Q: Arbitrary, R: Arbitrary, S: Arbitrary, T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, B: Arbitrary> Arbitrary for (C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, B)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<B: Arbitrary, C: Arbitrary, D: Arbitrary, E: Arbitrary, F: Arbitrary, G: Arbitrary, H: Arbitrary, I: Arbitrary, J: Arbitrary, K: Arbitrary, L: Arbitrary, M: Arbitrary, N: Arbitrary, O: Arbitrary, P: Arbitrary, Q: Arbitrary, R: Arbitrary, S: Arbitrary, T: Arbitrary, U: Arbitrary, V: Arbitrary, W: Arbitrary, X: Arbitrary, Y: Arbitrary, Z: Arbitrary, A: Arbitrary> Arbitrary for (B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, A)`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 1]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 1]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 1]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 2]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 2]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 2]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 3]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 3]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 3]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 4]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 4]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 4]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 5]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 5]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 5]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 6]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 6]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 6]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 7]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 7]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 7]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 8]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 8]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 8]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 9]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 9]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 9]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 10]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 10]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 10]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 11]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 11]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 11]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 12]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 12]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 12]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 13]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 13]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 13]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 14]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 14]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 14]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 15]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 15]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 15]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 16]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 16]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 16]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 17]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 17]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 17]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 18]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 18]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 18]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 19]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 19]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 19]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 20]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 20]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 20]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 21]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 21]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 21]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 22]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 22]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 22]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 23]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 23]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 23]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 24]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 24]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 24]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 25]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 25]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 25]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 26]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 26]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 26]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 27]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 27]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 27]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 28]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 28]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 28]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 29]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 29]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 29]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 30]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 30]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 30]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 31]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 31]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 31]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<T: Arbitrary> Arbitrary for [T; 32]`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<[T; 32]>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<[T; 32]>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<A: Arbitrary> Arbitrary for Vec<A>`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<K: Arbitrary + Ord, V: Arbitrary> Arbitrary for BTreeMap<K, V>`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<A: Arbitrary + Ord> Arbitrary for BTreeSet<A>`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<A: Arbitrary + Ord> Arbitrary for BinaryHeap<A>`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<K: Arbitrary + Eq + Hash, V: Arbitrary> Arbitrary for HashMap<K, V>`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<A: Arbitrary + Eq + Hash> Arbitrary for HashSet<A>`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<A: Arbitrary> Arbitrary for LinkedList<A>`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<A: Arbitrary> Arbitrary for VecDeque<A>`

[src]

`fn arbitrary(u: &mut Unstructured) -> Result<Self>`

[src]

`fn arbitrary_take_rest(u: Unstructured) -> Result<Self>`

[src]

`fn size_hint() -> (usize, Option<usize>)`

[src]

`fn shrink(&self) -> Box<dyn Iterator<Item = Self>>`

[src]

`impl<A: ?Sized> Arbitrary for Cow<'static, A> where`

A: ToOwned,

<A as ToOwned>::Owned: Arbitrary,

[src]

A: ToOwned,

<A as ToOwned>::Owned: Arbitrary,