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 method

    Initialise any return a new AnyCancellable that wraps this Cancellable instance.

    Declaration

    Swift

    public func eraseToAnyCancellable() -> AnyCancellable

    Return Value

    The AnyCancellable that wraps this Canellable.