tiny.hypothesis.Strategy
Defined in strategies.
Source
Source: lib/hypothesis/src/strategy.zig:7
zig
pub fn Strategy(comptime T: type) type { return struct { context: *const anyopaque, drawFn: *const fn (*const anyopaque, *ConjectureData, Allocator) DrawError!T, const Self = @This(); pub fn draw(self: Self, data: *ConjectureData, allocator: Allocator) DrawError!T { return self.drawFn(self.context, data, allocator); } pub fn from(comptime S: type, ptr: *const S) Self { return .{ .context = @ptrCast(ptr), .drawFn = &struct { fn call(ctx: *const anyopaque, data: *ConjectureData, allocator: Allocator) DrawError!T { const self: *const S = @ptrCast(@alignCast(ctx)); return self.draw(data, allocator); } }.call, }; } };}Source: lib/hypothesis/src/root.zig:52
zig
pub const Strategy = strategies.Strategy;Complete caller list
24 direct callers.
lib.hypothesis.src.auto.AutoStrategy[function] — private source atlib/hypothesis/src/auto.zig:15in nearest public ownertiny.hypothesis.autoderivetiny.hypothesis.autoderive.auto[function] atlib/hypothesis/src/auto.zig:29tiny.hypothesis.composites.FilterStrategy[function] atlib/hypothesis/src/composites.zig:298tiny.hypothesis.composites.FlatMapStrategy[function] atlib/hypothesis/src/composites.zig:338tiny.hypothesis.composites.ListStrategy[function] atlib/hypothesis/src/composites.zig:10tiny.hypothesis.composites.MapStrategy[function] atlib/hypothesis/src/composites.zig:273tiny.hypothesis.composites.OneOfStrategy[function] atlib/hypothesis/src/composites.zig:252tiny.hypothesis.composites.OptionalStrategy[function] atlib/hypothesis/src/composites.zig:230tiny.hypothesis.composites.PermutationStrategy.strategy[method] atlib/hypothesis/src/composites.zig:181tiny.hypothesis.composites.ShuffleStrategy[function] atlib/hypothesis/src/composites.zig:190tiny.hypothesis.composites.SplitPointsStrategy.strategy[method] atlib/hypothesis/src/composites.zig:142tiny.hypothesis.composites.StringStrategy.strategy[method] atlib/hypothesis/src/composites.zig:87tiny.hypothesis.composites.filter[function] atlib/hypothesis/src/composites.zig:321tiny.hypothesis.composites.filterWithRetries[function] atlib/hypothesis/src/composites.zig:325tiny.hypothesis.composites.flatMap[function] atlib/hypothesis/src/composites.zig:357tiny.hypothesis.composites.lists[function] atlib/hypothesis/src/composites.zig:46tiny.hypothesis.composites.listsWithLength[function] atlib/hypothesis/src/composites.zig:50tiny.hypothesis.composites.map[function] atlib/hypothesis/src/composites.zig:291tiny.hypothesis.composites.oneOf[function] atlib/hypothesis/src/composites.zig:269tiny.hypothesis.composites.optionals[function] atlib/hypothesis/src/composites.zig:248tiny.hypothesis.strategies.BooleanStrategy.strategy[method] atlib/hypothesis/src/strategy.zig:71tiny.hypothesis.strategies.BytesStrategy.strategy[method] atlib/hypothesis/src/strategy.zig:119tiny.hypothesis.strategies.FloatStrategy[function] atlib/hypothesis/src/strategy.zig:80tiny.hypothesis.strategies.IntegerStrategy[function] atlib/hypothesis/src/strategy.zig:32
Audit
| Definitions | 1 |
|---|---|
| Public names | 2 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |