not

Inverts a constraint

  1. struct not(OtherConstraint)
    @safe
    @constraint
    struct not (
    OtherConstraint
    ) {}
  2. struct not(alias otherConstraint)

Members

Functions

check
bool check(T actual)
Undocumented in source. Be warned that the author may not have intended to support it.
errorMessage
string errorMessage()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

otherConstraint
OtherConstraint otherConstraint;
Undocumented in source.

Examples

struct Data
{
    @not!notNaN // <-- must be NaN
    float value = float.nan;
}
struct Data
{
    @not!notNegative // <-- must *not* be non-negative
    int value;
}

Meta