ExitModule

PackageAxial

Summary

NameSignatureSynopsis
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.

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>

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>

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>

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>

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>

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>