UsageSnapshotting
public protocol UsageSnapshotting : AnyObject
A representation of the UsageStore narrowed down to a target identifier.
One can obtain an instance of this class by calling the snapshot(for:)
method of the UsageStore object.
-
Retrieves the usage records. Calls the given closure on each element in the snapshot in the same order
Declaration
Swift
func records(_ body: (UsageRecord) -> Bool)
Parameters
body
A closure that takes an element of the snapshot as a parameter.
-
The number of records in the snapshot.
Declaration
Swift
func recordCount() -> Int
-
Removes the original records from the UsageStore
Declaration
Swift
func removeRecords()