|
|
Chains a task-returning function on Ok inside a Task<Result>.
Short-circuits on Error.
-
f
:
'T -> Task<Result<'TResult, 'TError>>
-
The binding function applied to the Ok value.
-
tr
:
Task<Result<'T, 'TError>>
-
The input task containing a Result.
-
Returns:
Task<Result<'TResult, 'TError>>
|
|
|
Returns the Ok value or the given default from a Task<Result>.
The default value when Error.
The input task containing a Result.
-
def
:
'T
-
tr
:
Task<Result<'T, 'a>>
-
Returns:
Task<'T>
|
|
|
Discards the Ok value inside a Task<Result>.
The input task containing a Result.
-
tr
:
Task<Result<'a, 'TError>>
-
Returns:
Task<Result<unit, 'TError>>
|
|
|
Maps the Ok value inside a Task<Result>.
The mapping function applied to the Ok value.
The input task containing a Result.
-
f
:
'T -> 'TResult
-
tr
:
Task<Result<'T, 'TError>>
-
Returns:
Task<Result<'TResult, 'TError>>
|
|
|
Maps the Error value inside a Task<Result>.
The mapping function applied to the Error value.
The input task containing a Result.
-
f
:
'TError -> 'TError2
-
tr
:
Task<Result<'T, 'TError>>
-
Returns:
Task<Result<'T, 'TError2>>
|
|
|
Applies a side-effect on Ok inside a Task<Result> and returns unchanged.
Side-effect function applied to the Ok value.
The input task containing a Result.
-
f
:
'T -> unit
-
tr
:
Task<Result<'T, 'TError>>
-
Returns:
Task<Result<'T, 'TError>>
|
|
|
Applies a side-effect on Error inside a Task<Result> and returns unchanged.
Side-effect function applied to the Error value.
The input task containing a Result.
-
f
:
'TError -> unit
-
tr
:
Task<Result<'T, 'TError>>
-
Returns:
Task<Result<'T, 'TError>>
|
|
|
Converts a Task<Result> to Task<Option>: Ok becomes Some, Error becomes None.
The input task containing a Result.
-
tr
:
Task<Result<'T, 'a>>
-
Returns:
Task<'T option>
|
|
|
Returns the Ok value or computes a fallback from the Error inside a Task<Result>.
Function that computes a fallback from the Error value.
The input task containing a Result.
-
f
:
'TError -> 'T
-
tr
:
Task<Result<'T, 'TError>>
-
Returns:
Task<'T>
|