ErrorCode.opAssign

Assigns another error code or error code number.

  1. ErrorCode opAssign(ErrorNo that)
  2. ErrorCode opAssign(ErrorCode that)
    struct ErrorCode
    ref return @nogc nothrow pure @safe
    opAssign
    ()

Parameters

that ErrorCode

Numeric error code.

Return Value

Type: ErrorCode

$(D_KEYWORD this).

Examples

ErrorCode ec;
assert(ec == ErrorCode.success);

ec = ErrorCode.fault;
assert(ec == ErrorCode.fault);
auto ec1 = ErrorCode(ErrorCode.fault);
ErrorCode ec2;
assert(ec2 == ErrorCode.success);

ec2 = ec1;
assert(ec1 == ec2);

Meta