A function that decides whether the context stack represents a Context
value
A strategy for updating the context stack based on inputs
Combine this splitter with a "joiner" which obtains a consumer (generalized as
a HandlerFactory
for its substreams based on a Context value.
Combine this splitter with a "joiner" which obtains a consumer (generalized as
a HandlerFactory
for its substreams based on a Context value.
If the consumer logic is independent of any Context value, you can pass
a HandlerFactory directly instead of wrapping it as a function, since
HandlerFactory
extends Any => HandlerFactory
.
The result type returned by the consumer logic
The consumer logic for substreams generated by this Splitter
A Transformer that feeds inputs through this splitter to create
substreams, then feeds those substreams into the joiner
to create
Out
values that will be passed downstream.
(contextStackSplitter: StringAdd).self
(contextStackSplitter: StringFormat).self
(Since version 0.6) Use .map instead
(contextStackSplitter: ArrowAssoc[ContextStackSplitter[In, StackElem, Context]]).x
(Since version 2.10.0) Use leftOfArrow
instead
(contextStackSplitter: Ensuring[ContextStackSplitter[In, StackElem, Context]]).x
(Since version 2.10.0) Use resultOfEnsuring
instead
Base implementation for Splitters that deal with a "stack-like" input type, e.g. XML or JSON. As the stream goes through the splitter, a context stack is maintained, and passed into a ContextMatcher. Substream boundaries are defined as the events that cause the stack to enter and exit states that cause the
matcher
returns a value.The input type
The context stack type
The interpreted value returned by the
matcher
given a context stack