Streams

  • 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 AnyStream to create a custom stream by providing a closure for the pollNext method, rather than implementing StreamProtocol directly on a custom type.

    See more

    Declaration

    Swift

    public struct AnyStream<Output> : StreamProtocol
  • A type-erasing multicast stream.

    Multicast streams can yield their output to more than one receiver.

    See more

    Declaration

    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 more

    Declaration

    Swift

    public struct AnySharedStream<Output> : StreamConvertible