Appearance
ReadOnlyFlakePropertyWrapper β
Property wrapper for FlakeRepresentable objects
swift
@propertyWrapper class ReadOnlyFlakePropertyWrapper<Value> where Value : FlakePropertyType
Overview β
This property wrapper should only be used on FlakeRepresentable objects. It will sync your local variable with a Property
of the service object. Setting this variable will trigger a setProperties
flake message. Changes can be monitore by the valuePublisher and errors can be monitored by errorPublisher
Initializers β
init(initialπ) β
swift
init(initial: Value, id: FlakePropertyProtocol.Id)
Instance Properties β
errorPublisher β
swift
var errorPublisher: AnyPublisher<Error, Never>
Publisher to receive errors. Will publish values on DispatchQueue.main
id β
swift
let id: FlakePropertyProtocol.Id
The Flake Property Id
projectedValue β
swift
var projectedValue: ReadOnlyFlakePropertyWrapper<Value>
Access to the Property wrapper
valuePublisher β
swift
var valuePublisher: AnyPublisher<Value, Never>
Publisher to receive values. Will publish values on DispatchQueue.main
wrappedValue β
swift
var wrappedValue: Value
The wrapped value
Instance Methods β
updateWith(_π β
swift
func updateWith(FlakePropertyProtocol)
Function to update the Property in conformance with ReadableFlakeProperty