Expand description
§arbitrary_with
serde_with
analog for arbitrary
§Example
#[derive(Arbitrary)]
struct A {
#[arbitrary(with = As::<Option<DisplayFromStr<i32>>>::arbitrary)]
n: Option<String>,
};
let a: A = u.arbitrary()?;
if let Some(n) = a.n {
let _i: i32 = n.parse().unwrap();
}
Re-exports§
pub use arbitrary;
Modules§
- size_
hint - Utilities for working with and combining the results of
Arbitrary::size_hint
. - unstructured
- Wrappers around raw, unstructured bytes.
Structs§
- As
- AsWrap
- Helper to implement
Arbitrary
trait for adapters - Display
From Str - From
Into - Limit
Len - MaxRecursion
Reached - Error indicating that the maximum recursion depth has been reached while calculating
Arbitrary::size_hint
- Same
- Unstructured
- A source of unstructured data.
Enums§
- Error
- An enumeration of buffer creation errors
Traits§
- Arbitrary
- Generate arbitrary structured values from raw, unstructured data.
- Arbitrary
As - Unstructured
Ext
Type Aliases§
- Result
- A
Result
with the error type fixed asarbitrary::Error
.