Result<'TSuccess, 'TMessage>
Namespace: Chessie.ErrorHandling
Represents the result of a computation.
Union Cases
Union Case | Description |
Bad('TMessage list)
Signature: 'TMessage list
|
Represents the result of a failed computation.
|
Ok('TSuccess,'TMessage list)
Signature: 'TSuccess * 'TMessage list
|
Represents the result of a successful computation.
|
Static members
Static member | Description |
FailWith(message)
Signature: message:'TMessage -> Result<'TSuccess,'TMessage>
|
Creates a Failure result with the given message.
|
FailWith(messages)
Signature: messages:seq<'TMessage> -> Result<'TSuccess,'TMessage>
|
Creates a Failure result with the given messages.
|
Succeed(value, messages)
Signature: (value:'TSuccess * messages:seq<'TMessage>) -> Result<'TSuccess,'TMessage>
|
Creates a Success result with the given value and the given message.
|
Succeed(value, message)
Signature: (value:'TSuccess * message:'TMessage) -> Result<'TSuccess,'TMessage>
|
Creates a Success result with the given value and the given message.
|
Succeed(value)
Signature: value:'TSuccess -> Result<'TSuccess,'TMessage>
|
Creates a Success result with the given value.
|
Try(func)
Signature: func:Func<'TSuccess> -> Result<'TSuccess,exn>
|
Executes the given function on a given success or captures the failure
|