Lines Matching refs:arbitrary
5 …<p><strong>The trait for generating structured data from arbitrary, unstructured input.</strong></…
13 The `Arbitrary` crate lets you construct arbitrary instances of a type.
24 [**Read the API documentation on `docs.rs`!**](https://docs.rs/arbitrary)
30 you could take arbitrary `Rgb` instances in a test function that asserts some
46 arbitrary = { version = "1", features = ["derive"] }
54 use arbitrary::Arbitrary;
72 #[arbitrary(default)]
76 #[arbitrary(value = 255)]
81 // fn(&mut Unstructured) -> arbitrary::Result<T>
84 #[arbitrary(with = arbitrary_b)]
88 #[arbitrary(with = |u: &mut Unstructured| u.int_in_range(0..=64))]
92 fn arbitrary_b(u: &mut Unstructured) -> arbitrary::Result<u8> {
104 use arbitrary::{Arbitrary, Result, Unstructured};
114 fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self> {
115 let r = u8::arbitrary(u)?;
116 let g = u8::arbitrary(u)?;
117 let b = u8::arbitrary(u)?;