Step

private enum Step : Enum<McpScope.Step>

Five states: the stdlib's six, less the two that go with yieldAll's delegate-pull, plus the split of its single Failed — see Resuming.

Constructors

Link copied to clipboard
private constructor()

Entries

Link copied to clipboard

Buffer empty: run the body forward to its next yield.

Link copied to clipboard

pending holds a value next has not taken.

Link copied to clipboard

Body ran to completion.

Link copied to clipboard

Body threw. That throwable surfaced out of the hasNext that resumed it, so this only answers a re-entry — and is what lets Resuming mean what it says.

Link copied to clipboard

Held only across resume, and overwritten before it returns — by yieldRaw, by completion, or by Failed. Seeing it afterwards means the body suspended on something that is not yield and will wake on a foreign thread; RestrictsSuspension makes that unreachable, so this is an assertion. The stdlib merges this case with Failed and reports both as "Iterator has failed.".

Properties

Link copied to clipboard

Returns a representation of an immutable list of all enum entries, in the order they're declared.

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared.