A strategy for handling exhaustion of a buffer’s capacity.
SDKs
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
Framework
- Combine
Declaration
enum BufferingStrategy<Failure> where Failure : Error
A strategy for handling exhaustion of a buffer’s capacity.
SDKs
Framework
enum BufferingStrategy<Failure> where Failure : Error
case drop Newest
When full, discard the newly-received element without buffering it.
case drop Oldest
When full, remove the least recently-received element from the buffer.
case custom Error(() -> Failure)
When full, execute the closure to provide a custom error.
struct Publishers .Buffer
A publisher that buffers elements from an upstream publisher.
enum Publishers .Prefetch Strategy
A strategy for filling a buffer.