FailableAsynchronousOperation
open class FailableAsynchronousOperation<Failure> : AsynchronousOperation where Failure : Error
An AsynchronousOperation
that can finish with an error conforming to OperationError
.
-
Failure error.
Declaration
Swift
public final private(set) var error: Failure? { get set }
-
Finishes the operation with an
error
.Important
You should never call this method outside the operation main execution scope.Declaration
Swift
public func finish(with error: Failure)
-
Cancels the operation with an
error
.Declaration
Swift
open func cancel(with error: Failure)