Signal
final class Signal<Value, Error> where Error : Error
-
Chain the receiver with another, creating a new
Signal
every time the receiver sends a value, and returning the resultingSignal
.Equivalent calling
flatMap(_:, _:)
with a flatten strategy of.latest
and the sametransform
.Declaration
Swift
public func chain<U>(_ transform: @escaping (Value) -> Signal<U, NoError>) -> Signal<U, NoError>
Parameters
transform
A closure that takes a value emitted by the receiver, and that returns a
Signal
.Return Value
The resulting
Signal
. -
Chain the receiver with another, creating a new
SignalProducer
every time the receiver sends a value, and returning the resultingSignal
.Equivalent calling
flatMap(_:, _:)
with a flatten strategy of.latest
and the sametransform
.Declaration
Swift
public func chain<U>(_ transform: @escaping (Value) -> SignalProducer<U, NoError>) -> Signal<U, NoError>
Parameters
transform
A closure that takes a value emitted by the receiver, and that returns a
SignalProducer
.Return Value
The resulting
Signal
. -
Chain the receiver with another, creating a new
Property
every time the receiver sends a value, and returning the resultingSignal
.Equivalent calling
flatMap(_:, _:)
with a flatten strategy of.latest
and the sametransform
.Declaration
Swift
public func chain<P: PropertyProtocol>(_ transform: @escaping (Value) -> P) -> Signal<P.Value, NoError>
Parameters
transform
A closure that takes a value emitted by the receiver, and that returns a
Property
.Return Value
The resulting
Signal
. -
Chain the receiver with another, creating a new
Signal
every time the receiver sends a value, and returning the resultingSignal
. If the newSignal
isnil
, the value is ignored.Equivalent calling
flatMap(_:, _:)
with a flatten strategy of.latest
and the sametransform
.Declaration
Swift
public func chain<U>(_ transform: @escaping (Value) -> Signal<U, NoError>?) -> Signal<U, NoError>
Parameters
transform
A closure that takes a value emitted by the receiver, and that returns an optional
Signal
. If theSignal
isnil
, the value is ignored.Return Value
The resulting
Signal
. -
Chain the receiver with another, creating a new
SignalProducer
every time the receiver sends a value, and returning the resultingSignal
. If the newSignal
isnil
, the value is ignored.Equivalent calling
flatMap(_:, _:)
with a flatten strategy of.latest
and the sametransform
.Declaration
Swift
public func chain<U>(_ transform: @escaping (Value) -> SignalProducer<U, NoError>?) -> Signal<U, NoError>
Parameters
transform
A closure that takes a value emitted by the receiver, and that returns an optional
SignalProducer
. If theSignalProducer
isnil
, the value is ignored.Return Value
The resulting
Signal
. -
Chain the receiver with another, creating a new
Property
every time the receiver sends a value, and returning the resultingSignal
. If the newSignal
isnil
, the value is ignored.Equivalent calling
flatMap(_:, _:)
with a flatten strategy of.latest
and the sametransform
.Declaration
Swift
public func chain<P: PropertyProtocol>(_ transform: @escaping (Value) -> P?) -> Signal<P.Value, NoError>
Parameters
transform
A closure that takes a value emitted by the receiver, and that returns an optional
Property
. If theProperty
isnil
, the value is ignored.Return Value
The resulting
Signal
.