RealmWillChange
@frozen
public struct RealmWillChange : Publisher
A publisher which emits Void each time the Realm is refreshed.
Despite the name, this actually emits after the Realm is refreshed.
-
This publisher cannot fail.
Declaration
Swift
public typealias Failure = Never -
This publisher emits Void.
Declaration
Swift
public typealias Output = Void -
Captures the
NotificationTokenproduced by observing a Realm Collection.This allows you to do notification skipping when performing a
Realm.write(withoutNotifying:). You should use this call if you require to write to the Realm database and ignore this specific observation chain. TheNotificationTokenwill be saved on the specifiedKeyPathfrom the observation block set up inreceive(subscriber:).Declaration
Swift
public func saveToken<T>(on object: T, for keyPath: WritableKeyPath<T, NotificationToken?>) -> RealmWillChangeWithToken<T>Parameters
objectThe object which the
NotificationTokenis written to.keyPathThe KeyPath which the
NotificationTokenis written to.Return Value
A
RealmWillChangeWithTokenPublisher.
View on GitHub
Install in Dash