PropertyProtocol
protocol PropertyProtocol : AnyObject, BindingSource
-
Make the
Property
have an optionalValue
.Declaration
Swift
public func promoteOptional() -> Property<Value?>
-
Chain the receiver with another, creating a new
Signal
every time the receiver sends a value, and returning aSignalProducer
.Equivalent calling
flatMap(_:, _:)
with a flatten strategy of.latest
and the sametransform
.Declaration
Swift
public func chain<U>(_ transform: @escaping (Value) -> Signal<U, NoError>) -> SignalProducer<U, NoError>
Parameters
transform
A closure that takes a value emitted by the receiver, and that returns a
Signal
.Return Value
The resulting
SignalProducer
. -
Chain the receiver with another, creating a new
SignalProducer
every time the receiver sends a value, and returning aSignalProducer
.Equivalent calling
flatMap(_:, _:)
with a flatten strategy of.latest
and the sametransform
.Declaration
Swift
public func chain<U>(_ transform: @escaping (Value) -> SignalProducer<U, NoError>) -> SignalProducer<U, NoError>
Parameters
transform
A closure that takes a value emitted by the receiver, and that returns a
SignalProducer
.Return Value
The resulting
SignalProducer
. -
Chain the receiver with another, creating a new
Property
every time the receiver sends a value, and returning aSignalProducer
.Equivalent calling
flatMap(_:, _:)
with a flatten strategy of.latest
and the sametransform
.Declaration
Swift
public func chain<P: PropertyProtocol>(_ transform: @escaping (Value) -> P) -> SignalProducer<P.Value, NoError>
Parameters
transform
A closure that takes a value emitted by the receiver, and that returns a
Property
.Return Value
The resulting
SignalProducer
. -
Chain the receiver with another, creating a new
Signal
every time the receiver sends a value, and returning aSignalProducer
. 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>?) -> SignalProducer<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
SignalProducer
. -
Chain the receiver with another, creating a new
SignalProducer
every time the receiver sends a value, and returning aSignalProducer
. 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>?) -> SignalProducer<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
SignalProducer
. -
Chain the receiver with another, creating a new
Property
every time the receiver sends a value, and returning aSignalProducer
. 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?) -> SignalProducer<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
SignalProducer
.