Class
BaseOperation
open class BaseOperation<Success>: Operation
An operation that simplifies state flag handling and provides a method to finish a task delivering a result
containing either a Success response or an Error response.
State behavior:
-
The operation, regardless of state, will always return
isReadytrue. -
An executing operation will return
isExecutingtrue. -
A finished operation will return
isFinishedtrue. -
A cancelled operation will return
isCancelledtrue.
Relationships
Conforms To
Operation
Nested Type Aliases
Properties
isReady
open override var isReady: Bool
isExecuting
open override var isExecuting: Bool
isFinished
open override var isFinished: Bool
Methods
start()
open override func start()
cancel()
open override func cancel()
finish(with:)
open func finish(with result: Result)