Generic Enumeration


A strategy for handling exhaustion of a buffer’s capacity.


enum BufferingStrategy<Failure> where Failure : Error


Buffering Strategies

case dropNewest

When full, discard the newly-received element without buffering it.

case dropOldest

When full, remove the least recently-received element from the buffer.

case customError(() -> Failure)

When full, execute the closure to provide a custom error.

See Also

Buffering Elements

struct Publishers.Buffer

A publisher that buffers elements from an upstream publisher.

enum Publishers.PrefetchStrategy

A strategy for filling a buffer.