Registry / testing / derive-arbitrary

derive-arbitrary

JSON →
library1.4.2rscratesunverified

Derive macro for the Arbitrary trait to generate random structured data.

# Cargo.toml [dependencies] derive_arbitrary = "1.4.2"
INSTALL
IMPORT
SIG · DERIVE-ARBITRARY
D
derive-arbitrary
testingrustv1.4.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Arbitrary
use derive_arbitrary::Arbitrary;

Derives Arbitrary for a struct to enable fuzzing.

use derive_arbitrary::Arbitrary; use arbitrary::Arbitrary; #[derive(Arbitrary, Debug)] struct Point { x: u32, y: u32 } fn main() { let mut data = arbitrary::Unstructured::new(&[1,2,3,4,5,6,7,8]); let p = Point::arbitrary(&mut data).unwrap(); println!("{:?}", p); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.4.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
derive-arbitrary — cargo add derive-arbitrary · libregistry