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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.