Disposables

public struct Disposables

A collection of utility methods for common disposable operations.

  • Constructs a new disposable with the given action used for disposal.

    Declaration

    Swift

    public static func create(with dispose: @escaping () -> Void) -> Cancelable

    Parameters

    dispose

    Disposal action which will be run upon calling dispose.

  • Creates a disposable that does nothing on disposal.

    Declaration

    Swift

    public static func create() -> Disposable