pub enum State {
Initial,
ExpectingFirstListItemOrEnd,
ExpectingNextListItem,
ExpectingFirstDictFieldOrEnd,
ExpectingDictFieldValue,
ExpectingDictFieldKeyOrEnd,
}Expand description
States while parsing list or dictionaries.
There are no states for integers and strings because it’s a straightforward operation. We know when they finish and there is no recursion.
States are displayed with a short name using only one letter:
I, L, M, D, E, F
This comes from the original implementation in C.
Variants§
Initial
The initial state. /// The sort display name for the state is L.
ExpectingFirstListItemOrEnd
Expecting the first list item or the end of the list. The sort display name for the state is L.
ExpectingNextListItem
Expecting the next list item. List contains at least one item. The sort display name for the state is M.
ExpectingFirstDictFieldOrEnd
Expecting the first dict field or the end of the dict. The sort display name for the state is D.
ExpectingDictFieldValue
Expecting the dict field value. The sort display name for the state is E.
ExpectingDictFieldKeyOrEnd
Expecting the dict field key or the end of the dict. The sort display name for the state is F.