Skip to documentation
SLOP

tiny.hypothesis.Strategy

Reference tiny.hypothesis Strategy

Defined in strategies.

Called byCallsNo direct callsprivate sourcelib.hypothesis.src.autoAutoStrategyautoderiveautocompositesFilterStrategycompositesFlatMapStrategycompositesListStrategy+19 morestrategiesStrategy
Static calls · unresolved targets: 3 · external targets: 0.

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.

Audit

Definitions1
Public names2
Members0
Version26.7.0
Revisiondaab053ee433