Appearance
fetchObjects(ofType:newObjectsHandler:destroyedObjectsHandler:)
Fetch Objects of spezified Type
swift
func fetchObjects(ofType objectType: UUID, newObjectsHandler: @escaping (FlakeObject) -> Void, destroyedObjectsHandler: @escaping (FlakeObject) -> Void) async throws -> [FlakeObject]
Return Value
Inital Set of FlakeObjects with spezified Type
Parameters
- objectType: The UUID of the desired Service
- newObjectsHandler: Callback to receive new FlakeObjects that may be created after the call to this function
- destroyedObjectsHandler: Callback to get notifyed about FlakeObjects that get destroyed after the call to this function
Discussion
After registering you will receive an inital result of currently provided FlakeObject, after which you will be notified about new or destroyed objects