Streams
-
Declaration
Swift
public protocol StreamConvertible
-
A type-erasing stream.
Use
AnyStream
to wrap a stream whose type has details you don’t want to expose. This is typically the case when returning streams from a function or storing streams in properties.You can also use
See moreAnyStream
to create a custom stream by providing a closure for thepollNext
method, rather than implementingStreamProtocol
directly on a custom type.Declaration
Swift
public struct AnyStream<Output> : StreamProtocol
-
A type-erasing multicast stream.
Multicast streams can yield their output to more than one receiver.
See moreDeclaration
Swift
public struct AnyMulticastStream<Output> : StreamConvertible
-
A type-erasing shared stream.
Shared streams can yield their output to more than one receiver and are safe to use from multiple tasks concurrently.
See moreDeclaration
Swift
public struct AnySharedStream<Output> : StreamConvertible
-
Declaration
Swift
public typealias AnyResultStream<Success, Failure> = AnyStream<Result<Success, Failure>> where Failure : Error
-
Declaration
Swift
public struct ResultStream<Success, Failure> : StreamProtocol where Failure : Error