Generic Enumeration


A strategy that handles exhaustion of a buffer’s capacity.


enum BufferingStrategy<Failure> where Failure : Error


Buffering Strategies

case dropNewest

When the buffer is full, discard the newly received element.

case dropOldest

When the buffer is full, discard the oldest element in the buffer.

case customError(() -> Failure)

When the buffer is 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.