Trait fuzz_util::zerocopy::ArbitraryFromBytes
source · pub trait ArbitraryFromBytes<'a>: FromBytes + Sized {
// Required method
fn arbitrary_from_bytes(u: &mut Unstructured<'a>) -> Result<Self>;
}
Expand description
Extension trait that allows construction of arbitrary values via
[zerocopy::FromBytes
].
ArbitraryFromBytes
has a blanket implementation for all types that
implement zerocopy::FromBytes
.
Required Methods§
sourcefn arbitrary_from_bytes(u: &mut Unstructured<'a>) -> Result<Self>
fn arbitrary_from_bytes(u: &mut Unstructured<'a>) -> Result<Self>
Constructs an arbitrary instance of Self
from the provided
unstructured data.
Object Safety§
This trait is not object safe.