SignalProducer

  • A SignalProducer creates Signals that can produce values of type Value and/or fail with errors of type Error. If no failure should be possible, NoError can be specified for Error.

    SignalProducers can be used to represent operations or tasks, like network requests, where each invocation of start() will create a new underlying operation. This ensures that consumers will receive the results, versus a plain Signal, where the results might be sent before any observers are attached.

    Because of the behavior of start(), different Signals created from the producer may see a different version of Events. The Events may arrive in a different order between Signals, or the stream might be completely different!

    See more

    Declaration

    Swift

    public struct SignalProducer<Value, Error> where Error : Error
  • A protocol for constraining associated types to SignalProducer.

    See more

    Declaration

    Swift

    public protocol SignalProducerProtocol