Returns the specified error if the task-wrapped value is false.
'a -> Task<bool> -> Task<Result<unit, 'a>>`Returns the specified error if the task-wrapped value is true.
'a -> Task<bool> -> Task<Result<unit, 'a>>`Converts an task-wrapped Option to a Result, using the given error if None.
'a -> Task<'b option> -> Task<Result<'b, 'a>>`Converts an task-wrapped Option to a Result, using the given error factory if None. The error factory is only called when the value is None.
(unit -> 'a) -> Task<'b option> -> Task<Result<'b, 'a>>Converts an task-wrapped Option to a Result, using the given error if Some.
'a -> Task<'b option> -> Task<Result<unit, 'a>>`Converts an task-wrapped Option to a Result, using the given error factory if Some. The error factory is only called when the value is Some.
(unit -> 'a) -> Task<'b option> -> Task<Result<unit, 'a>>Converts an task-wrapped ValueOption to a Result, using the given error if ValueNone.
'a -> Task<'b voption> -> Task<Result<'b, 'a>>Converts an task-wrapped ValueOption to a Result, using the given error if ValueSome.
'a -> Task<'b voption> -> Task<Result<unit, 'a>>Returns Ok if the task-wrapped value and the provided value are equal, or the specified error if not. Same as requireEqualTo, but with a parameter order that fits normal function application better than piping.
'a -> Task<'a> -> 'b -> Task<Result<unit, 'b>>Returns Ok if the task-wrapped value and the provided value are equal, or the specified error if not. Same as requireEqual, but with a parameter order that fits piping better than normal function application.
'a -> 'b -> Task<'a> -> Task<Result<unit, 'b>>Returns Ok if the task-wrapped sequence is empty, or the specified error if not.
'a -> Task<'b> -> Task<Result<unit, 'a>>Returns Ok if the task-wrapped sequence is non-empty, or the specified error if not.
'a -> Task<'b> -> Task<Result<unit, 'a>>Returns the first item of the sequence if it exists, or the specified error if the sequence is empty
'a -> Task<'b> -> Task<Result<'c, 'a>>Returns the provided task-wrapped result if it is Ok and the predicate is true, or if the task-wrapped result is Error. If the predicate is false, returns a new task-wrapped Error result with the error value.
('a -> bool) -> 'b -> Task<Result<'a,'b>> -> Task<Result<'a,'b>>Replaces an error value of an task-wrapped result with a custom error value
'a -> Task<Result<'b, 'c>> -> Task<Result<'b, 'a>>Replaces a unit error value of an task-wrapped result with a custom error value. Safer than setError since you're not losing any information.
'a -> Task<Result<'b, unit>> -> Task<Result<'b, 'a>>Extracts the contained value of an task-wrapped result if Ok, otherwise uses the provided value.
'a -> Task<Result<'a, 'b>> -> Task<'a>Extracts the contained value of an task-wrapped result if Ok, otherwise evaluates the given function and uses the result.
(unit -> 'a) -> Task<Result<'a, 'b>> -> Task<'a>Same as defaultValue for a result where the Ok value is unit. The name describes better what is actually happening in this case.
Task<Result<unit, 'a>> -> Task<unit>If the task-wrapped result is Ok, executes the function on the Ok value. Passes through the input value unchanged.
('a -> unit) -> Task<Result<'a, 'b>> -> Task<Result<'a, 'b>>If the task-wrapped result is Error, executes the function on the Error value. Passes through the input value unchanged.
('a -> unit) -> Task<Result<'b, 'a>> -> Task<Result<'b, 'a>>If the task-wrapped result is Ok and the predicate returns true for the wrapped value, executes the function on the Ok value. Passes through the input value unchanged.
('a -> bool) -> ('a -> unit) -> Task<Result<'a, 'b>> -> Task<Result<'a, 'b>>If the task-wrapped result is Error and the predicate returns true for the wrapped value, executes the function on the Error value. Passes through the input value unchanged.
('a -> bool) -> ('a -> unit) -> Task<Result<'b, 'a>> -> Task<Result<'b, 'a>>Converts a Result<Task<'a>, 'b> to Task<Result<'a, 'b>>.
Result<Task<'a>, 'b> -> Task<Result<'a, 'b>>Extracts the contained error value of a task-wrapped result if Error, otherwise uses the provided value.
'error -> Task<Result<'ok, 'error>> -> Task<'error>The bindRequire* functions combine a bind and a require check in one step. They bind the inner Ok value through a function, then assert a condition on the result, returning Error with the given error value if the condition is not met.
Binds the task result and requires the inner Ok value to be Some, returning Error with the given error if it is None.
'error -> Task<Result<'ok option, 'error>> -> Task<Result<'ok, 'error>>Binds the task result and requires the inner Ok value to be None, returning Error with the given error if it is Some.
'error -> Task<Result<'ok option, 'error>> -> Task<Result<unit, 'error>>Binds the task result and requires the inner Ok value to be ValueSome, returning Error with the given error if it is ValueNone.
'error -> Task<Result<'ok voption, 'error>> -> Task<Result<'ok, 'error>>Binds the task result and requires the inner Ok value to be ValueNone, returning Error with the given error if it is ValueSome.
'error -> Task<Result<'ok voption, 'error>> -> Task<Result<unit, 'error>>Binds the task result and requires the inner Ok value to be true, returning Error with the given error if it is false.
'error -> Task<Result<bool, 'error>> -> Task<Result<unit, 'error>>Binds the task result and requires the inner Ok value to be false, returning Error with the given error if it is true.
'error -> Task<Result<bool, 'error>> -> Task<Result<unit, 'error>>Binds the task result and requires the inner Ok value to be non-null, returning Error with the given error if it is null.
'error -> Task<Result<'ok, 'error>> -> Task<Result<'ok, 'error>>Binds the task result and requires the inner Ok value to equal the provided value, returning Error with the given error if they differ.
'ok -> 'error -> Task<Result<'ok, 'error>> -> Task<Result<unit, 'error>>Binds the task result and requires the inner Ok sequence to be empty, returning Error with the given error if it is not.
'error -> Task<Result<#seq<'ok>, 'error>> -> Task<Result<unit, 'error>>Binds the task result and requires the inner Ok sequence to be non-empty, returning Error with the given error if it is empty.
'error -> Task<Result<#seq<'ok>, 'error>> -> Task<Result<unit, 'error>>Binds the task result and returns the first element of the inner Ok sequence, returning Error with the given error if the sequence is empty.
'error -> Task<Result<#seq<'ok>, 'error>> -> Task<Result<'ok, 'error>>