ExitModule

PackageAxial
Represents the final outcome of a workflow execution.

Summary

NameSignatureSynopsis
Union cases
IsSuccessthis.IsSuccessNo description available.
IsFailurethis.IsFailureNo description available.
SuccessSuccess 'valueThe workflow completed successfully.
FailureFailure Cause<'error>The workflow failed due to a specific cause.
Operations
mapExit.map mapper exitTransforms the success value of an exit outcome using the provided function.
bindExit.bind binder exitBinds the success value of an exit outcome to a function that returns a new exit outcome.
mapErrorExit.mapError mapper exitTransforms the error value of a failed exit outcome using the provided function.
mapBothExit.mapBoth onSuccess onFailure exitTransforms both success and failure outcomes of an exit using the provided functions.
fromResultExit.fromResult resultCreates an exit outcome from a standard F# Result.
toResultExit.toResult exitConverts an exit outcome to a standard F# Result.

Union cases

kind:member

IsSuccess

this.IsSuccess
Member

Returns

bool
kind:member

IsFailure

this.IsFailure
Member

Returns

bool
kind:member

Success

Success 'value
Member
The workflow completed successfully.

Parameters

NameTypeDescription
Item'value

Returns

unit
kind:member

Failure

Failure Cause<'error>
Member
The workflow failed due to a specific cause.

Parameters

NameTypeDescription
ItemCause<'error>

Returns

unit

Operations

kind:member

map

Exit.map mapper exit
Member
Transforms the success value of an exit outcome using the provided function.

Parameters

NameTypeDescription
mapper'v -> 'wThe function to transform the success value.
exitExit<'v, 'e>The exit outcome to transform.

Returns

Exit<'w, 'e>
kind:member

bind

Exit.bind binder exit
Member
Binds the success value of an exit outcome to a function that returns a new exit outcome.

Parameters

NameTypeDescription
binder'v -> Exit<'w, 'e>The function that takes a success value and returns a new exit outcome.
exitExit<'v, 'e>The exit outcome to bind.

Returns

Exit<'w, 'e>
kind:member

mapError

Exit.mapError mapper exit
Member
Transforms the error value of a failed exit outcome using the provided function.

Parameters

NameTypeDescription
mapper'e -> 'fThe function to transform the error value.
exitExit<'v, 'e>The exit outcome to transform.

Returns

Exit<'v, 'f>
kind:member

mapBoth

Exit.mapBoth onSuccess onFailure exit
Member
Transforms both success and failure outcomes of an exit using the provided functions.

Parameters

NameTypeDescription
onSuccess'v -> 'wThe function to transform the success value.
onFailureCause<'e> -> Cause<'f>The function to transform the failure cause.
exitExit<'v, 'e>The exit outcome to transform.

Returns

Exit<'w, 'f>
kind:member

fromResult

Exit.fromResult result
Member
Creates an exit outcome from a standard F# Result.

Parameters

NameTypeDescription
resultResult<'v, 'e>The result to convert.

Returns

Exit<'v, 'e>
kind:member

toResult

Exit.toResult exit
Member
Converts an exit outcome to a standard F# Result.

Parameters

NameTypeDescription
exitExit<'v, 'e>The exit outcome to convert.

Returns

Result<'v, 'e>