Filestack Documentation

Class Base​Operation

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 isReady true.

  • An executing operation will return isExecuting true.

  • A finished operation will return isFinished true.

  • A cancelled operation will return isCancelled true.

BaseOperation BaseOperation Operation Operation BaseOperation->Operation

Conforms To

Operation

Nested Type Aliases

Result

public typealias Result = Swift.Result<Success, Error>

Properties

is​Ready

open override var isReady: Bool  

is​Executing

open override var isExecuting: Bool  

is​Finished

open override var isFinished: Bool  

result

open private(set) var result: Result  

Returns the result of operation.

Methods

start()

open override func start()  

cancel()

open override func cancel()  

finish(with:​)

open func finish(with result: Result)