Triggered when a new item is collected. The collect function receives the
item (data) and the collection itself (collect). Can perform any
asynchronous or synchronous operations needed to handle the collected item.
Triggered when an item is removed or disposed of from the collection. The
dispose function receives the data item (data) and the collection itself
(collect). Use this to handle any cleanup or additional logic when an item
is removed from the collection.
Triggered when the collection process ends. The end function receives the
final collection (collected) and a reason (reason) for the collection’s
termination. Use this to handle any finalization or post-processing steps.
Triggered when a data item is ignored. The ignore function is called with
the ignored item (data). This is useful for cases where items do not meet
certain criteria and should not be added to the collection.
The data item to be ignored.
Interface representing the events for the collector.