flattenNestedBoth

Flatten the nested Outcome inside both Success and Failure states, into a single Outcome.

The Ok and Error types of the returned Outcome will be the nearest common AncestorOk and AncestorError.

Receiver

The Outcome to flatten, with a nested Outcome inside both success and failure states.

Return

The flattened Outcome<AncestorOk, AncestorError>.

Parameters

SuccessOk

The type of the Success value nested inside the Success.

SuccessError

The type of the Failure error nested inside the Success.

FailureOk

The type of the Success value nested inside the Failure.

FailureError

The type of the Failure error nested inside the Failure.

AncestorOk

The nearest common ancestor type of SuccessOk and FailureOk.

AncestorError

The nearest common ancestor type of SuccessError and FailureError.

See also