Appearance
fetchObjects(newObjectsHandler:destroyedObjectsHandler:)
Fetch FlakeObject and wrap them in an user defined FlakeRepresentable object
swift
func fetchObjects<Object>(newObjectsHandler: @escaping (Object) -> Void, destroyedObjectsHandler: @escaping (Address) -> Void) async throws -> [Object] where Object : FlakeRepresentable
Return Value
Inital Set of FlakeRepresentable Objects
Parameters
- newObjectsHandler: Callback to receive new FlakeRepresentables 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
Using FlakeRepresentable objects allows the SDK to automatically convert FlakeObjects into domain specific Objects.