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
AnyCancellable
that wraps thisCancellable
instance.Declaration
Swift
public func eraseToAnyCancellable() -> AnyCancellable
Return Value
The
AnyCancellable
that wraps thisCanellable
.