Sinks
-
Declaration
Swift
public protocol SinkConvertible
-
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
See moreAnySink
to create a custom sink by providing a closure for thepollSend
,pollFlush
andpollClose
methods, rather than implementingSinkProtocol
directly on a custom type.Declaration
Swift
public struct AnySink<Input, Failure> : SinkProtocol where Failure : Error