arbitrary

Trait Arbitrary

Source
pub trait Arbitrary<'a>: Sized {
    // Required method
    fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self>;

    // Provided methods
    fn arbitrary_take_rest(u: Unstructured<'a>) -> Result<Self> { ... }
    fn size_hint(depth: usize) -> (usize, Option<usize>) { ... }
}
Expand description

Generate arbitrary structured values from raw, unstructured data.

The Arbitrary trait allows you to generate valid structured values, like HashMaps, or ASTs, or MyTomlConfig, or any other data structure from raw, unstructured bytes provided by a fuzzer.

§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 = "1", 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 something of that sort. The Unstructured type helps you with these tasks.

use arbitrary::{Arbitrary, Result, Unstructured};

impl<'a, T> Arbitrary<'a> for MyCollection<T>
where
    T: Arbitrary<'a>,
{
    fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self> {
        // Get an iterator of arbitrary `T`s.
        let iter = u.arbitrary_iter::<T>()?;

        // And then create a collection!
        let mut my_collection = MyCollection::new();
        for elem_result in iter {
            let elem = elem_result?;
            my_collection.insert(elem);
        }

        Ok(my_collection)
    }
}

Required Methods§

Source

fn arbitrary(u: &mut Unstructured<'a>) -> 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§

Source

fn arbitrary_take_rest(u: Unstructured<'a>) -> 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.

Source

fn size_hint(depth: usize) -> (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.

§The depth Parameter

If you 100% know that the type you are implementing Arbitrary for is not a recursive type, or your implementation is not transitively calling any other size_hint methods, you can ignore the depth parameter. Note that if you are implementing Arbitrary for a generic type, you cannot guarantee the lack of type recursion!

Otherwise, you need to use arbitrary::size_hint::recursion_guard(depth) to prevent potential infinite recursion when calculating size hints for potentially recursive types:

use arbitrary::{Arbitrary, Unstructured, size_hint};

// This can potentially be a recursive type if `L` or `R` contain
// something like `Box<Option<MyEither<L, R>>>`!
enum MyEither<L, R> {
    Left(L),
    Right(R),
}

impl<'a, L, R> Arbitrary<'a> for MyEither<L, R>
where
    L: Arbitrary<'a>,
    R: Arbitrary<'a>,
{
    fn arbitrary(u: &mut Unstructured) -> arbitrary::Result<Self> {
        // ...
    }

    fn size_hint(depth: usize) -> (usize, Option<usize>) {
        // Protect against potential infinite recursion with
        // `recursion_guard`.
        size_hint::recursion_guard(depth, |depth| {
            // If we aren't too deep, then `recursion_guard` calls
            // this closure, which implements the natural size hint.
            // Don't forget to use the new `depth` in all nested
            // `size_hint` calls! We recommend shadowing the
            // parameter, like what is done here, so that you can't
            // accidentally use the wrong depth.
            size_hint::or(
                <L as Arbitrary>::size_hint(depth),
                <R as Arbitrary>::size_hint(depth),
            )
        })
    }
}

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<'a> Arbitrary<'a> for &'a str

Source§

impl<'a> Arbitrary<'a> for &'a [u8]

Source§

impl<'a> Arbitrary<'a> for bool

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for char

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for f32

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for f64

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for i8

Source§

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

Source§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for i16

Source§

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

Source§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for i32

Source§

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

Source§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for i64

Source§

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

Source§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for i128

Source§

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

Source§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for isize

Source§

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

Source§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for u8

Source§

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

Source§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for u16

Source§

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

Source§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for u32

Source§

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

Source§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for u64

Source§

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

Source§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for u128

Source§

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

Source§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for ()

Source§

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

Source§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for usize

Source§

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

Source§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for Box<str>

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for CString

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for String

Source§

impl<'a> Arbitrary<'a> for Ipv4Addr

Source§

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

Source§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for Ipv6Addr

Source§

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

Source§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for AtomicBool

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for AtomicIsize

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for AtomicUsize

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for Duration

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for OsString

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for PathBuf

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for NonZeroI8

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for NonZeroI16

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for NonZeroI32

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for NonZeroI64

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for NonZeroI128

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for NonZeroIsize

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for NonZeroU8

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for NonZeroU16

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for NonZeroU32

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for NonZeroU64

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for NonZeroU128

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a> Arbitrary<'a> for NonZeroUsize

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A> Arbitrary<'a> for Cow<'a, A>
where A: ToOwned + ?Sized, <A as ToOwned>::Owned: Arbitrary<'a>,

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A> Arbitrary<'a> for Range<A>
where A: Arbitrary<'a> + Clone + PartialOrd,

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A> Arbitrary<'a> for RangeFrom<A>
where A: Arbitrary<'a> + Clone + PartialOrd,

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A> Arbitrary<'a> for RangeInclusive<A>
where A: Arbitrary<'a> + Clone + PartialOrd,

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A> Arbitrary<'a> for RangeTo<A>
where A: Arbitrary<'a> + Clone + PartialOrd,

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A> Arbitrary<'a> for RangeToInclusive<A>
where A: Arbitrary<'a> + Clone + PartialOrd,

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A: Arbitrary<'a> + Eq + Hash, S: BuildHasher + Default> Arbitrary<'a> for HashSet<A, S>

Source§

impl<'a, A: Arbitrary<'a> + Ord> Arbitrary<'a> for BinaryHeap<A>

Source§

impl<'a, A: Arbitrary<'a> + Ord> Arbitrary<'a> for BTreeSet<A>

Source§

impl<'a, A: Arbitrary<'a>> Arbitrary<'a> for Option<A>

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A: Arbitrary<'a>> Arbitrary<'a> for Box<[A]>

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A: Arbitrary<'a>> Arbitrary<'a> for Box<A>

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A: Arbitrary<'a>> Arbitrary<'a> for LinkedList<A>

Source§

impl<'a, A: Arbitrary<'a>> Arbitrary<'a> for VecDeque<A>

Source§

impl<'a, A: Arbitrary<'a>> Arbitrary<'a> for Rc<A>

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A: Arbitrary<'a>> Arbitrary<'a> for Arc<A>

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A: Arbitrary<'a>> Arbitrary<'a> for Vec<A>

Source§

impl<'a, A: Arbitrary<'a>> Arbitrary<'a> for Cell<A>

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A: Arbitrary<'a>> Arbitrary<'a> for RefCell<A>

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A: Arbitrary<'a>> Arbitrary<'a> for UnsafeCell<A>

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A: Arbitrary<'a>> Arbitrary<'a> for Empty<A>

Source§

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

Source§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A: Arbitrary<'a>> Arbitrary<'a> for PhantomData<A>

Source§

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

Source§

fn size_hint(_depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A: Arbitrary<'a>> Arbitrary<'a> for Wrapping<A>

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A: Arbitrary<'a>> Arbitrary<'a> for Mutex<A>

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, A: Arbitrary<'a>, B: Arbitrary<'a>> Arbitrary<'a> for Result<A, B>

Source§

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

Source§

fn size_hint(depth: usize) -> (usize, Option<usize>)

Source§

impl<'a, B: Arbitrary<'a>, C: Arbitrary<'a>, D: Arbitrary<'a>, E: Arbitrary<'a>, F: Arbitrary<'a>, G: Arbitrary<'a>, H: Arbitrary<'a>, I: Arbitrary<'a>, J: Arbitrary<'a>, K: Arbitrary<'a>, L: Arbitrary<'a>, M: Arbitrary<'a>, N: Arbitrary<'a>, O: Arbitrary<'a>, P: Arbitrary<'a>, Q: Arbitrary<'a>, R: Arbitrary<'a>, S: Arbitrary<'a>, T: Arbitrary<'a>, U: Arbitrary<'a>, V: Arbitrary<'a>, W: Arbitrary<'a>, X: Arbitrary<'a>, Y: Arbitrary<'a>, Z: Arbitrary<'a>, A: Arbitrary<'a>> Arbitrary<'a> 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)

Source§

impl<'a, C: Arbitrary<'a>, D: Arbitrary<'a>, E: Arbitrary<'a>, F: Arbitrary<'a>, G: Arbitrary<'a>, H: Arbitrary<'a>, I: Arbitrary<'a>, J: Arbitrary<'a>, K: Arbitrary<'a>, L: Arbitrary<'a>, M: Arbitrary<'a>, N: Arbitrary<'a>, O: Arbitrary<'a>, P: Arbitrary<'a>, Q: Arbitrary<'a>, R: Arbitrary<'a>, S: Arbitrary<'a>, T: Arbitrary<'a>, U: Arbitrary<'a>, V: Arbitrary<'a>, W: Arbitrary<'a>, X: Arbitrary<'a>, Y: Arbitrary<'a>, Z: Arbitrary<'a>, B: Arbitrary<'a>> Arbitrary<'a> 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)

Source§

impl<'a, D: Arbitrary<'a>, E: Arbitrary<'a>, F: Arbitrary<'a>, G: Arbitrary<'a>, H: Arbitrary<'a>, I: Arbitrary<'a>, J: Arbitrary<'a>, K: Arbitrary<'a>, L: Arbitrary<'a>, M: Arbitrary<'a>, N: Arbitrary<'a>, O: Arbitrary<'a>, P: Arbitrary<'a>, Q: Arbitrary<'a>, R: Arbitrary<'a>, S: Arbitrary<'a>, T: Arbitrary<'a>, U: Arbitrary<'a>, V: Arbitrary<'a>, W: Arbitrary<'a>, X: Arbitrary<'a>, Y: Arbitrary<'a>, Z: Arbitrary<'a>, C: Arbitrary<'a>> Arbitrary<'a> 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)

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<'a, K: Arbitrary<'a> + Eq + Hash, V: Arbitrary<'a>, S: BuildHasher + Default> Arbitrary<'a> for HashMap<K, V, S>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<'a, T, const N: usize> Arbitrary<'a> for [T; N]
where T: Arbitrary<'a>,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

impl<'a, Z: Arbitrary<'a>> Arbitrary<'a> for (Z,)

Source§

impl<'a, Z: Arbitrary<'a>, Y: Arbitrary<'a>> Arbitrary<'a> for (Z, Y)

Implementors§