Cancellable
public protocol Cancellable : AnyObject, Hashable
A protocol indicating that a update listener can be cancelled.
Implementations of this protocol must call the cancel function on deinit.
-
Stop further updates being sent to the update listener, freeing any resources held on to by the subscription.
Declaration
Swift
func cancel() -
eraseToAnyCancellable()Extension methodInitialise any return a new
AnyCancellablethat wraps thisCancellableinstance.Declaration
Swift
public func eraseToAnyCancellable() -> AnyCancellableReturn Value
The
AnyCancellablethat wraps thisCanellable.
View on GitHub
Cancellable Protocol Reference