Result is a wrapper type (abstract) around the Either type to semantically represent the state of an operation.
Result
Either
read onlyisFailure:Bool
It is true if Result wraps an error.
read onlyisSuccess:Bool
It is true if Result wraps a value.
error ():Null<TFailure>
Converts Result into a nullable value of type TFailure.
optionError ():Option<TFailure>
Converts Result<TSuccess, TFailure> into Option<TFailure>. The result is Some(error) if Result contained an error. It is None if it contains a value.
Result<TSuccess, TFailure>
Option<TFailure>
Some(error)
None
optionValue ():Option<TSuccess>
Converts Result<TSuccess, TFailure> into Option<TSuccess>. The result is Some(value) if Result contained a value. It is None if it contains an error.
Option<TSuccess>
Some(value)
value ():Null<TSuccess>
Converts Result into a nullable value of type TSuccess.
staticinline failure<TSuccess, TFailure> (error:TFailure):Result<TSuccess, TFailure>
staticinline success<TSuccess, TFailure> (value:TSuccess):Result<TSuccess, TFailure>