Skip to documentation
SLOP

tiny.hypothesis.Generator

Reference tiny.hypothesis Generator

Defined in value.

Called byCallsprivate sourcelib.hypothesis.src.valueCheckValueAllocPropertyTypeprivate sourcelib.hypothesis.src.valueCheckValuePropertyTypeprivate sourcelib.hypothesis.src.valueFilteredGeneratorTypeprivate sourcelib.hypothesis.src.valueFixedArrayGeneratorTypeprivate sourcelib.hypothesis.src.valueFlatMappedGeneratorType+16 moreprivate sourcelib.hypothesis.src.valueFilteredGeneratorTypeprivate sourcelib.hypothesis.src.valueFlatMappedGeneratorTypeprivate sourcelib.hypothesis.src.valueMappedGeneratorTypevalueGenerator
Static calls · unresolved targets: 1 · external targets: 1.

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.

Audit

Definitions1
Public names2
Members0
Version26.7.0
Revisiondaab053ee433