validator
An optional closure that decides whether a generated sample is valid.
Declaration
var validator: (nonisolated(nonsending) @Sendable (SampleType) async throws -> Bool)?Discussion
When provided, the generator collects rejected samples in invalidSamples.