asFailure

Casts the current Result instance to a Failure type.

Return

The current instance cast as a Failure<TResult>.

Throws

if the current instance is not of type Failure<TResult>.