valueOrThrow abstract method

Success valueOrThrow()

Returns the value for success and throws the error on failure.

Prefer using when.

Implementation

Success valueOrThrow();