to Fault
Wraps this value as a Fault based on isFailure.
isFailure returns
false→ emptySuccess.
Parameters
T
The type of the value to wrap.
is Failure
Determines whether the value represents a failure.
null→ Failure wrapping a NullPointerException.Throwable, ThrowableWrapper → Failure wrapping the throwable directly.
Anything else → emptySuccess.
Parameters
T
The type of the value to wrap.