flattenNestedSuccess

Flatten a nested Outcome inside the Outcome.Success state, into a single Outcome.

The Error type of the returned Outcome will be the nearest common AncestorError of EmbeddedError and OuterError.

Receiver

The Outcome.Success of an Outcome<Ok, EmbeddedError> to flatten.

Return

The flattened Outcome<Ok, AncestorError>.

Parameters

Ok

The type of the Outcome.Success value.

EmbeddedError

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

OuterError

The type of the non-nested Outcome.Failure error.

AncestorError

The nearest common ancestor type of EmbeddedError and OuterError.

See also