AsyncReadablePropertyType
public protocol AsyncReadablePropertyType : AnyObject, AsyncPropertyType
Undocumented
-
The property’s value type.
Declaration
Swift
associatedtype Value -
The type of change delivered by the signal. For simple properties, this will be the same as
Value, but for complex properties (e.g. whereValueis an array or tree structure) this may be an enumerated type that indicates fine-grained changes to the value.Declaration
Swift
associatedtype SignalChange -
Converts this instance into a concrete
AsyncReadableProperty.Declaration
Swift
var property: AsyncReadableProperty<Value> { get } -
The underlying signal.
Declaration
Swift
var signal: Signal<SignalChange> { get } -
The most recent value delivered by the underlying signal.
Declaration
Swift
var value: Value? { get }
-
start()Extension methodDeclaration
Swift
public func start()
-
map(_:)Extension methodReturns an AsyncReadableProperty whose value is derived from this property’s
value. The giventransformwill be applied whenever this property’s value changes.Declaration
Swift
public func map<U>(_ transform: @escaping (Self.Value) -> U) -> AsyncReadableProperty<U> -
flatMap(_:)Extension methodReturns an AsyncReadableProperty whose value is derived from the given property’s
value. The giventransformwill be applied whenever this property’s value changes, and in turn the property returned bytransformbecomes the new source of values.Declaration
Swift
public func flatMap<P: AsyncReadablePropertyType>(_ transform: @escaping (Self.Value) -> P) -> AsyncReadableProperty<P.Value> where P.Value == P.SignalChange
AsyncReadablePropertyType Protocol Reference