Registry / testing / arbitrary

arbitrary

JSON →
library1.4.2rscratesunverified

The trait for generating structured data from unstructured data.

# Cargo.toml [dependencies] arbitrary = "1.4.2"
INSTALL
IMPORT
SIG · ARBITRARY
A
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 arbitrary::Arbitrary;

Derives Arbitrary for a struct and generates an instance from raw bytes.

use arbitrary::Arbitrary; #[derive(Arbitrary, Debug)] struct Point { x: i32, y: i32, } fn main() { let mut data = arbitrary::Unstructured::new(&[1, 2, 3, 4, 5, 6, 7, 8]); let point = Point::arbitrary(&mut data).unwrap(); println!("{:?}", point); }
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
26 hits · last 30 days
node
20
OpenAI (training)
1
Resources
arbitrary — cargo add arbitrary · libregistry