SynchronizationUpdate
private struct SynchronizationUpdate : Hashable, Sendable
A synchronization update to perform on a shared instance.
-
A closure that accepts a
pathininstanceand avalueto write.Declaration
Swift
typealias Apply = @Sendable ( _ value: Any, _ path: PartialKeyPath<TypedProgram>, _ instance: inout TypedProgram ) -> Void -
The path to the value to update.
Declaration
Swift
let pathToUpdate: PartialKeyPath<TypedProgram> -
A closure executing the update.
Declaration
Swift
let apply: Apply -
Hashes the salient parts of
selfintohasher.Declaration
Swift
func hash(into hasher: inout Hasher) -
Returns
trueifflis equal tor.Declaration
Swift
static func == (l: `Self`, r: `Self`) -> Bool -
Creates an instance that writes
valueatpathToUpdatein a typed program.Declaration
Swift
init(_ pathToUpdate: PartialKeyPath<TypedProgram>, applying apply: @escaping Apply)
View on GitHub