ArgValue.opEquals

bool opEquals(const ArgValue rhs) const @safe pure nothrow @nogc

Compares this value to another ArgValue for equality.

Two ArgValue instances are considered equal if and only if they are of the same underlying Type and their contained values are equal. For the NONE type, two values compare equal.

Parameters

rhsThe right-hand side ArgValue to compare with.

Returns

true if both values are of the same type and equal.
bool opEquals(string rhs) const @safe pure nothrow @nogc

Compares this ArgValue with a string for equality.

Equality returns true only when this value holds a STRING and the stored string equals rhs. For any other underlying type, the result is false.

Parameters

rhsThe string value to compare against.

Returns

true if this is a STRING with the same content as rhs.
bool opEquals(bool rhs) const @safe pure nothrow @nogc

Compares this ArgValue with a boolean for equality.

Equality returns true only when this value holds a BOOL and the stored boolean equals rhs. For any other underlying type, the result is false.

Parameters

rhsThe boolean value to compare against.

Returns

true if this is a BOOL equal to rhs.
bool opEquals(int rhs) const @safe pure nothrow @nogc

Compares this ArgValue with a 32-bit integer for equality.

Equality returns true only when this value holds a LONG and the stored integer (narrowed to 32-bit) equals rhs. For any other underlying type, the result is false.

Parameters

rhsThe 32-bit integer value to compare against.

Returns

true if this is a LONG whose value equals rhs after narrowing.
bool opEquals(long rhs) const @safe pure nothrow @nogc

Compares this ArgValue with a long integer for equality.

Equality returns true only when this value holds a LONG and the stored integer equals rhs. For any other underlying type, the result is false.

Parameters

rhsThe long value to compare against.

Returns

true if this is a LONG equal to rhs.
bool opEquals(double rhs) const @safe pure nothrow @nogc

Compares this ArgValue with a double for equality.

Equality returns true only when this value holds a DOUBLE and the stored floating point value equals rhs exactly.

Parameters

rhsThe double value to compare against.

Returns

true if this is a DOUBLE equal to rhs.
bool opEquals(const(string[]) rhs) const @safe pure nothrow @nogc

Compares this ArgValue with a list of strings for equality.

Equality returns true only when this value holds a LIST and the stored list equals rhs element-wise. For any other underlying type, the result is false.

Parameters

rhsThe list to compare against.

Returns

true if this is a LIST equal to rhs.