AnyCancellable

public final class AnyCancellable : Cancellable

A concrete implementation of the Cancellable protocol.

  • Declaration

    Swift

    public static func == (lhs: AnyCancellable, rhs: AnyCancellable) -> Bool
  • Initialise a new AnyCancellable that wraps the provided cancellable.

    This object will not call cancel when deinitialised to allow the wrapped Cancellable to be stored independently of the wrapper.

    Declaration

    Swift

    public init<Cancellable>(_ cancellable: Cancellable) where Cancellable : Cancellable

    Parameters

    cancellable

    The Cancellable to wrap.

  • Declaration

    Swift

    public func cancel()
  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)