Skip to content

FlakePropertyWrapper ​

Property wrapper for FlakeRepresentable objects

swift
@propertyWrapper final class FlakePropertyWrapper<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πŸ†”isActionable:isVolatile:) ​

swift
init(initial: Value, id: FlakePropertyProtocol.Id, isActionable: Bool, isVolatile: Bool)

Instance Properties ​

containingObjectUpdater ​

swift
var containingObjectUpdater: ([FlakePropertyProtocol]) -> Void

Function to use after receiving a setting resutl, in conformance to SettableFlakeProperty

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

isActionable ​

swift
let isActionable: Bool

isVolatile ​

swift
let isVolatile: Bool

projectedValue ​

swift
var projectedValue: FlakePropertyWrapper<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 ​

registerPropertySetter(_πŸ˜ƒ ​

swift
func registerPropertySetter((FlakePropertyProtocol) async throws -> [FlakePropertyProtocol])

Function to register updater, in conformance to SettableFlakeProperty

updateWith(_πŸ˜ƒ ​

swift
func updateWith(FlakePropertyProtocol)

Function to update the Property in conformance with ReadableFlakeProperty