Other Functions
Returns
true
if the value is Ok, otherwise returns false
.Result<_> -> bool
Returns
true
if the value is Error, otherwise returns false
.Result<_> -> bool
Converts a
Result<Async<'a>, 'b>
to Async<Result<'a, 'b>>
.Result<Async<'a>, 'b> -> Async<Result<'a, 'b>>
Converts a
Result<'a, 'error>
to Async<Result<'b, 'error>>
by applying the given function to the Ok value.('okInput -> Async<'okOutput>) -> Result<'okInput, 'error>
-> Async<Result<'okOutput, 'error>>
Replaces an error value with a custom error value
'a -> Result<'b, 'c> -> Result<'b, 'a>
Replaces a unit error value with a custom error value. Safer than
setError
since you're not losing any information.'a -> Result<'b, unit> -> Result<'b, 'a>
Returns the contained value if Ok, otherwise returns the provided value
'a -> Result<'a, 'b> -> 'a
Returns the contained value if Ok, otherwise evaluates the given function and returns the result.
(unit -> 'a) -> Result<'a, 'b> -> 'a
Returns the Ok value or runs the specified function over the error value.
('b -> 'a) -> Result<'a, 'b> -> 'a
Same as
defaultValue
for a result where the Ok value is unit. The name describes better what is actually happening in this case.Result<unit, 'a> -> unit
Last modified 2mo ago