Appearance
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