isRule

Tests if something is a Rule, defined as having a primitive applyRule

returns true if T is a Rule. A Rule is the most basic form of a $(CU rule). It must define the primitive void applyRule().

enum isRule (
T
)

Return Value

true if T is a Rule, false if not

Examples

struct A { void applyRule() {} }
struct B { int applyRule(int b) { return int.init; } }

static assert( isRule!A );
static assert(!isRule!B );
static assert(!isRule!string );

Meta