Skip to content

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