Trait soroban_sdk::testutils::arbitrary::SorobanArbitrary
source · pub trait SorobanArbitrary: TryFromVal<Env, Self::Prototype> + IntoVal<Env, Val> + TryFromVal<Env, Val> {
type Prototype: for<'a> Arbitrary<'a>;
}
Available on crate feature
testutils
only.Expand description
An Env
-hosted contract value that can be randomly generated.
Types that implement SorabanArbitrary
have an associated “prototype”
type that implements Arbitrary
.
This exists partly so that the prototype can be named like
fuzz_target!(|input: <Bytes as SorobanArbitrary>::Prototype| {
// ...
});
Required Associated Types§
sourcetype Prototype: for<'a> Arbitrary<'a>
type Prototype: for<'a> Arbitrary<'a>
A type that implements Arbitrary
and can be converted to this
SorobanArbitrary
type.
Object Safety§
This trait is not object safe.