CoCancellable

public protocol CoCancellable : AnyObject

Undocumented

  • Cancels the current CoCancellable.

    Declaration

    Swift

    func cancel()
  • Adds an observer callback that is called when the CoCancellable is completed.

    Declaration

    Swift

    func whenComplete(_ callback: @escaping () -> Void)

    Parameters

    callback

    The callback that is called when the CoCancellable is completed.

  • added(to:) Extension method

    Adds weak referance of self to CoScope.

    Declaration

    Swift

    @discardableResult
    @inlinable
    public func added(to scope: CoScope) -> Self

    Parameters

    scope

    CoScope to add self to.

    Return Value

    The current CoCancellable.