Generic Instance Method

collect(_:options:)

Collects elements by a given strategy, and emits a single array of the collection.

Declaration

func collect<S>(_ strategy: Publishers.TimeGroupingStrategy<S>, options: S.SchedulerOptions? = nil) -> Publishers.CollectByTime<Publishers.MapKeyPath2<Upstream, Output0, Output1>, S> where S : Scheduler

Parameters

strategy

The strategy with which to collect and publish elements.

options

Scheduler options to use for the strategy.

Return Value

A publisher that collects elements by a given strategy, and emits a single array of the collection.