AnyDisposable
public final class AnyDisposable : Disposable
A type-erased disposable that forwards operations to an underlying disposable.
-
Declaration
Swift
public var isDisposed: Bool { get }
-
Create a disposable which runs the given action upon disposal.
Declaration
Swift
public init(_ action: @escaping () -> Void)
Parameters
action
A closure to run when calling
dispose()
. -
Create a disposable.
Declaration
Swift
public init()
-
Create a disposable which wraps the given disposable.
Declaration
Swift
public init(_ disposable: Disposable)
Parameters
disposable
The disposable to be wrapped.
-
Declaration
Swift
public func dispose()