Mixin that ensures a type models the desired signature of a structure
Attribute that can be applied on identifiers in a signature that will let the model checker know not to take attributes in to account
Attribute that can be applied on identifiers in a signature that will let the model checker know not to take type qualifiers in to account
Asserts that the given model follows the specification of the given signature
Checks if type Model is a model of type Sig
interface InputRange(T) { @property bool empty(); @property T front(); @ignoreAttributes void popFront(); } struct R(T) { mixin Models!(InputRange!T); T[] values; int index; this(T[] arr) { values = arr; } @property bool empty() { return values.length == index; } @property T front() { return values[index]; } void popFront() { index++; } } import std.range: array; auto r = R!int([1, 4, 2, 3]); assert(r.array == [1, 4, 2, 3]);
Provides utilites that allow you to enforce signatures - a specification for a structure