tiny.hypothesis.Generator
Defined in value.
Source
Source: lib/hypothesis/src/value.zig:61
zig
pub fn Generator(comptime T: type) type { return struct { drawFn: *const fn (*ConjectureData) anyerror!T, const Self = @This(); pub fn draw(self: Self, data: *ConjectureData) anyerror!T { return self.drawFn(data); } pub fn map( comptime self: Self, comptime U: type, comptime f: *const fn (T) U, ) Generator(U) { return .{ .drawFn = &MappedGeneratorType(T, U, self, f).draw }; } pub fn filter(comptime self: Self, comptime pred: *const fn (T) bool) Self { return .{ .drawFn = &FilteredGeneratorType(T, self, pred).draw }; } pub fn flatMap( comptime self: Self, comptime U: type, comptime f: *const fn (T) Generator(U), ) Generator(U) { return .{ .drawFn = &FlatMappedGeneratorType(T, U, self, f).draw }; } };}Source: lib/hypothesis/src/root.zig:54
zig
pub const Generator = value.Generator;Complete caller list
21 direct callers.
lib.hypothesis.src.value.CheckValueAllocPropertyType[function] — private source atlib/hypothesis/src/value.zig:394in nearest public ownertiny.hypothesis.valuelib.hypothesis.src.value.CheckValuePropertyType[function] — private source atlib/hypothesis/src/value.zig:373in nearest public ownertiny.hypothesis.valuelib.hypothesis.src.value.FilteredGeneratorType[function] — private source atlib/hypothesis/src/value.zig:106in nearest public ownertiny.hypothesis.valuelib.hypothesis.src.value.FixedArrayGeneratorType[function] — private source atlib/hypothesis/src/value.zig:249in nearest public ownertiny.hypothesis.valuelib.hypothesis.src.value.FlatMappedGeneratorType[function] — private source atlib/hypothesis/src/value.zig:123in nearest public ownertiny.hypothesis.valuelib.hypothesis.src.value.ListGeneratorType[function] — private source atlib/hypothesis/src/value.zig:223in nearest public ownertiny.hypothesis.valuelib.hypothesis.src.value.MappedGeneratorType[function] — private source atlib/hypothesis/src/value.zig:93in nearest public ownertiny.hypothesis.valuetiny.hypothesis.value.boolean[function] atlib/hypothesis/src/value.zig:196tiny.hypothesis.value.bytes[function] atlib/hypothesis/src/value.zig:208tiny.hypothesis.value.checkValue[function] atlib/hypothesis/src/value.zig:418tiny.hypothesis.value.checkValueAlloc[function] atlib/hypothesis/src/value.zig:441tiny.hypothesis.value.fixedArray[function] atlib/hypothesis/src/value.zig:263tiny.hypothesis.value.float32[function] atlib/hypothesis/src/value.zig:176tiny.hypothesis.value.float64[function] atlib/hypothesis/src/value.zig:188tiny.hypothesis.value.gen_point[function] atlib/hypothesis/src/value.zig:322tiny.hypothesis.value.gen_quaternion[function] atlib/hypothesis/src/value.zig:367tiny.hypothesis.value.gen_unit_vec3[function] atlib/hypothesis/src/value.zig:339tiny.hypothesis.value.integer[function] atlib/hypothesis/src/value.zig:158tiny.hypothesis.value.list[function] atlib/hypothesis/src/value.zig:241tiny.hypothesis.value.oneOf[function] atlib/hypothesis/src/value.zig:316tiny.hypothesis.value.tuple[function] atlib/hypothesis/src/value.zig:298
Audit
| Definitions | 1 |
|---|---|
| Public names | 2 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |