flattenNestedBoth

Flatten the nested Outcome inside both Outcome.Success and Outcome.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 Outcome.Success value nested inside the Outcome.Success.

SuccessError

The type of the Outcome.Failure error nested inside the Outcome.Success.

FailureOk

The type of the Outcome.Success value nested inside the Outcome.Failure.

FailureError

The type of the Outcome.Failure error nested inside the Outcome.Failure.

AncestorOk

The nearest common ancestor type of SuccessOk and FailureOk.

AncestorError

The nearest common ancestor type of SuccessError and FailureError.

See also