It is highly desirable to facilitate loading collection elements lazily according to buffered upstream. In such a scenario, subscribers request fresh elements supplies on-demand to receive aggregated collection as a result. Supplier is responsible to iterate over a collection responding with the next buffer of elements to collect in feed. Feed is completing passing aggregates when the supplier has iterated over the whole collection having no next buffer to send.
Eventually, provide catch closure for feed to handle faulty responses from the supplier and continue receiving elements from further requests.
Feed code sample from Wikia using RxSwift can serve as a good starting point to implement feed publisher in native Swift using Combine.
It is highly desirable to facilitate loading collection elements lazily according to buffered upstream. In such a scenario, subscribers request fresh elements supplies on-demand to receive aggregated collection as a result. Supplier is responsible to iterate over a collection responding with the next buffer of elements to collect in feed. Feed is completing passing aggregates when the supplier has iterated over the whole collection having no next buffer to send.
Eventually, provide catch closure for feed to handle faulty responses from the supplier and continue receiving elements from further requests.
Feed code sample from Wikia using RxSwift can serve as a good starting point to implement feed publisher in native Swift using Combine.