Subscription
open class Subscription : Cancellable
An object that represents a subscription to a Storage update.
-
Declaration
Swift
public static func == (lhs: Subscription, rhs: Subscription) -> Bool -
A closure that will be called when the subscription is cancelled.
Declaration
Swift
public typealias CancelClosure = () -> Void -
Create a new subscription that will call the provided closure when cancelled.
Declaration
Swift
public required init(cancel: @escaping CancelClosure)Parameters
cancelThe closure to call when the subscription is cancelled.
-
Cancel the update subscription, preventing further updates being sent to the update listener, freeing any resources held on to by the subscription.
Declaration
Swift
open func cancel() -
Declaration
Swift
open func hash(into hasher: inout Hasher)
View on GitHub
Subscription Class Reference