DittoChangeObserver
public class DittoChangeObserver
extension DittoChangeObserver: Hashable
extension DittoChangeObserver: Equatable
A change observer invokes a change handler whenever results for its query change.
Create a change observer by calling DittoStore.registerChangeObserver()
.
-
The store this change observer is registered with.
Declaration
Swift
public private(set) weak var store: DittoStore? { get }
-
The query string of the change observer (as passed when registering it).
Declaration
Swift
public let queryString: String
-
The query arguments of the change observer (as passed when registering it).
Declaration
Swift
public let queryArguments: Dictionary<String, Any?>?
-
Convenience property, returns
true
if the change obsever has been cancelled, otherwise returnsfalse
. Also, a change observer is considered cancelled if the owning Ditto object goes out of scope.Declaration
Swift
public var isCancelled: Bool { get }
-
Cancels the change observation and unregisters it from the owning store. No-op if it’s already cancelled or the owning
Ditto
object goes out of scope.Declaration
Swift
public func cancel()
-
Declaration
Swift
public func hash(into hasher: inout Hasher)
-
Declaration
Swift
public static func == (left: DittoChangeObserver, right: DittoChangeObserver) -> Bool