flattenNestedSuccess

Flatten a nested Outcome inside the 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 Success of an Outcome<Ok, EmbeddedError> to flatten.

Return

The flattened Outcome<Ok, AncestorError>.

Parameters

Ok

The type of the Success value.

EmbeddedError

The type of the Failure error nested inside the Success.

OuterError

The type of the non-nested Failure error.

AncestorError

The nearest common ancestor type of EmbeddedError and OuterError.

See also