Either.right

Either right(T)(auto ref T value) if (is(T == R)) static

Construct an Either holding the right alternative.

Parameters

valuevalue of exactly type R; implicit conversions are rejected so the alternatives can never be confused.

Returns

the constructed Either.
inout(R) right() ref inout return

Returns the right payload by reference.

Calling right() while the left alternative is active is a programming error and terminates the process (see the module documentation).

Returns

a reference to the stored R, retaining transitive qualifiers.