unwrap property

T get unwrap

Returns the value if successful, otherwise throws the error.

Implementation

T get unwrap {
  if (this is Success<T, E>) {
    return (this as Success<T, E>).value;
  }
  throw (this as Failure<T, E>).error as Object;
}