Kommand
open class Kommand<Result>
Generic Kommand
-
Kommand
See morestate Declaration
Swift
public indirect enum State : Equatable
-
Action closure type
Declaration
Swift
public typealias ActionClosure = () throws -> Result
-
Success closure type
Declaration
Swift
public typealias SuccessClosure = (_ result: Result) -> Void
-
Error closure type
Declaration
Swift
public typealias ErrorClosure = (_ error: Swift.Error?) -> Void
-
Retry closure type
Declaration
Swift
public typealias RetryClosure = (_ error: Swift.Error?, _ executionCount: UInt) -> Bool
-
Kommand
state Declaration
Swift
internal(set) public final var state: Kommand<Result>.State
-
Kommand
instance with deliverer, executor and actionClosure returning generic and throwing errors Declaration
Swift
public required init(deliverer: Dispatcher = .current, executor: Dispatcher = .default, actionClosure: @escaping ActionClosure)
-
Specify Kommand
success closure Declaration
Swift
@discardableResult open func success(_ success: @escaping SuccessClosure) -> Self
-
Specify Kommand
error closure Declaration
Swift
@discardableResult open func error(_ error: @escaping ErrorClosure) -> Self
-
Specify Kommand
error closure Declaration
Swift
@discardableResult open func error<Reason: Swift.Error>(_ type: Reason.Type, _ error: @escaping (_ error: Reason) -> Void) -> Self
-
Specify Kommand
retry closure Declaration
Swift
@discardableResult open func retry(_ retry: @escaping RetryClosure) -> Self
-
Specify Kommand
error closure Declaration
Swift
@discardableResult open func retry<Reason: Swift.Error>(_ type: Reason.Type, _ retry: @escaping (_ error: Reason?, _ executionCount: UInt) -> Bool) -> Self
-
Undocumented
Declaration
Swift
open var result: Result? { get }
-
Undocumented
Declaration
Swift
open var error: Error? { get }
-
Execute Kommand
after delay Declaration
Swift
@discardableResult open func execute(after delay: DispatchTimeInterval) -> Self
-
Execute Kommand
Declaration
Swift
@discardableResult open func execute() -> Self
-
Cancel Kommand
after delay Declaration
Swift
@discardableResult open func cancel(_ throwingError: Bool = false, after delay: DispatchTimeInterval) -> Self
-
Cancel Kommand
Declaration
Swift
@discardableResult open func cancel(_ throwingError: Bool = false) -> Self
-
Retry Kommand
after delay Declaration
Swift
@discardableResult open func retry(after delay: DispatchTimeInterval) -> Self
-
Retry Kommand
Declaration
Swift
@discardableResult open func retry() -> Self