Future.isRejected

bool isRejected() const @trusted nothrow @nogc

Check whether the future was rejected with an error.

Returns

true if the future was completed with an error.