Lines Matching full:unstructured
9 //! Wrappers around raw, unstructured bytes.
16 /// A source of unstructured data.
18 /// An `Unstructured` helps `Arbitrary` implementations interpret raw data
21 /// string" (the raw data wrapped by an `Unstructured`) results in a small
25 /// `Unstructured` is deterministic: given the same raw data, the same series of
27 /// like running out of memory). However, `Unstructured` does not guarantee
31 /// You shouldn't generally need to use an `Unstructured` unless you are writing
42 /// Below is what translating the fuzzer's raw input into an `Unstructured` and
47 /// use arbitrary::{Arbitrary, Unstructured};
61 /// // Wrap it in an `Unstructured`.
62 /// let mut unstructured = Unstructured::new(raw_data);
65 /// if let Ok(rgb) = Rgb::arbitrary(&mut unstructured) {
71 pub struct Unstructured<'a> { struct
75 impl<'a> Unstructured<'a> { argument
76 /// Create a new `Unstructured` from the given raw data.
81 /// use arbitrary::Unstructured;
83 /// let u = Unstructured::new(&[1, 2, 3, 4]);
86 Unstructured { data } in new()
95 /// use arbitrary::{Arbitrary, Unstructured};
97 /// let mut u = Unstructured::new(&[1, 2, 3]);
112 /// Is the underlying unstructured data exhausted?
114 /// `unstructured.is_empty()` is the same as `unstructured.len() == 0`.
119 /// use arbitrary::{Arbitrary, Unstructured};
121 /// let mut u = Unstructured::new(&[1, 2, 3, 4]);
147 /// use arbitrary::{Arbitrary, Unstructured};
159 /// let mut u = Unstructured::new(&[1, 2, 3, 4]);
187 /// use arbitrary::{Arbitrary, Result, Unstructured};
198 /// fn arbitrary(u: &mut Unstructured<'a>) -> Result<Self> {
283 /// use arbitrary::{Arbitrary, Unstructured};
285 /// let mut u = Unstructured::new(&[1, 2, 3, 4]);
313 "`arbitrary::Unstructured::int_in_range` requires a non-empty range" in int_in_range_impl()
386 /// use arbitrary::Unstructured;
388 /// let mut u = Unstructured::new(&[1, 2, 3, 4, 5, 6, 7, 8, 9, 0]);
399 /// use arbitrary::Unstructured;
401 /// let mut u = Unstructured::new(&[1, 2, 3, 4, 5, 6, 7, 8, 9, 0]);
424 /// use arbitrary::Unstructured;
426 /// let mut u = Unstructured::new(&[1, 2, 3, 4, 5, 6, 7, 8, 9, 0]);
441 /// use arbitrary::Unstructured;
443 /// let mut u = Unstructured::new(&[1, 2, 3, 4, 5, 6, 7, 8, 9, 0]);
472 /// use arbitrary::Unstructured;
475 /// let mut u = Unstructured::new(&my_data);
500 /// If this `Unstructured` does not have enough underlying data to fill the
506 /// use arbitrary::Unstructured;
508 /// let mut u = Unstructured::new(&[1, 2, 3, 4]);
541 /// use arbitrary::Unstructured;
543 /// let mut u = Unstructured::new(&[1, 2, 3, 4]);
568 /// use arbitrary::Unstructured;
570 /// let u = Unstructured::new(&[1, 2, 3]);
590 /// use arbitrary::Unstructured;
592 /// let mut u = Unstructured::new(&[1, 2, 3]);
637 /// The function is given this `Unstructured` so that it can continue to
657 /// use arbitrary::{Result, Unstructured};
671 /// fn arbitrary_types_context(u: &mut Unstructured) -> Result<Vec<Type>> {
718 /// Utility iterator produced by [`Unstructured::arbitrary_iter`]
720 u: &'b mut Unstructured<'a>,
736 /// Utility iterator produced by [`Unstructured::arbitrary_take_rest_iter`]
738 u: Option<Unstructured<'a>>,
889 let mut u = Unstructured::new(&[1, 2, 3, 4, 5, 6, 7, 8, 9, 6]); in test_byte_size()
897 let mut u = Unstructured::new(&v); in test_byte_size()
905 let mut u = Unstructured::new(&[1, 2, 3, 4, 5, 6, 7, 8, 9, 6]); in int_in_range_of_one()
914 let mut u = Unstructured::new(&[1, 2]); in int_in_range_uses_minimal_amount_of_bytes()
918 let mut u = Unstructured::new(&[1, 2]); in int_in_range_uses_minimal_amount_of_bytes()
922 let mut u = Unstructured::new(&[1]); in int_in_range_uses_minimal_amount_of_bytes()
932 let mut u = Unstructured::new(&input); in int_in_range_in_bounds()
936 let mut u = Unstructured::new(&input); in int_in_range_in_bounds()
955 let mut u = Unstructured::new(&input); in int_in_range_covers_unsigned_range()
959 let mut u = Unstructured::new(&input); in int_in_range_covers_unsigned_range()
963 let mut u = Unstructured::new(&input); in int_in_range_covers_unsigned_range()
967 let mut u = Unstructured::new(&input); in int_in_range_covers_unsigned_range()
1001 let mut u = Unstructured::new(&input); in int_in_range_covers_signed_range()
1005 let mut u = Unstructured::new(&input); in int_in_range_covers_signed_range()
1009 let mut u = Unstructured::new(&input); in int_in_range_covers_signed_range()
1013 let mut u = Unstructured::new(&input); in int_in_range_covers_signed_range()