Sinks

  • A type-erasing sink.

    Use AnySink to wrap a sink whose type has details you don’t want to expose. This is typically the case when returning sinks from a function or storing sinks in properties.

    You can also use AnySink to create a custom sink by providing a closure for the pollSend, pollFlush and pollClose methods, rather than implementing SinkProtocol directly on a custom type.

    See more

    Declaration

    Swift

    public struct AnySink<Input, Failure> : SinkProtocol where Failure : Error