A consumer is effectively a generalized “fold” operation,
and in fact each consumer will eventually be converted into a
Folder. What makes a consumer special is that, like a
Producer, it can be split into multiple consumers using
split_at method. When a consumer is split, it produces two
consumers, as well as a reducer. The two consumers can be fed
items independently, and when they are done the reducer is used to
combine their two results into one. See the
README for further details.
The type of folder that this consumer can be converted into.
The type of reducer that is produced if this consumer is split.
The type of result that this consumer will ultimately produce.
Divide the consumer into two consumers, one processing items
0..index and one processing items from
produces a reducer that can be used to reduce the results at
Convert the consumer into a folder that can consume items sequentially, eventually producing a final result.
Hint whether this
Consumer would like to stop processing
further items, e.g. if a search has been completed.