PolicyType
Constructors and combinators for environment-aware workflow requirements.
Specification
Kind
Type
Members
6
Examples
0
liftSignature
lift operation mapError environment input
withErrorSignature
withError operation error
contextSignature
context operation mapError environment input
passSignature
pass environment input
composeSignature
compose first second environment input
Summary
| Name | Signature | Synopsis |
|---|---|---|
| Operations | ||
| lift | lift operation mapError environment input | Lifts a pure result-returning function and maps its error into the workflow error type. |
| withError | withError operation error | Lifts a pure result-returning function and replaces any error with a fixed workflow error. |
| context | context operation mapError environment input | Lifts an environment-aware result-returning function and maps its error into the workflow error type. |
| pass | pass environment input | A policy that returns the input unchanged. |
| compose | compose first second environment input | Composes two policies left to right. |
| optional | optional enabled policy environment input | Runs a policy only when the environment predicate is true; otherwise returns the input unchanged. |
Operations
kind:member
kind:member
kind:member
Lifts an environment-aware result-returning function and maps its error into the workflow error type.
Parameters
| Name | Type | Description |
|---|---|---|
| operation | 'env -> 'input -> Result<'output, 'innerError> | |
| mapError | 'innerError -> 'error | |
| environment | 'env | |
| input | 'input |
Returns
Result<'output, 'error>
kind:member
kind:member
kind:member

