SignalProducer
-
A SignalProducer creates Signals that can produce values of type
Value
and/or fail with errors of typeError
. If no failure should be possible,Never
can be specified forError
.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
See morestart()
, 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!Declaration
Swift
public struct SignalProducer<Value, Error> where Error : Error
extension SignalProducer: SignalProducerConvertible, SignalProducerProtocol
extension SignalProducer: BindingSource where Error == Never
-
A protocol for constraining associated types to
See moreSignalProducer
.Declaration
Swift
public protocol SignalProducerProtocol