View on GitHub

mini-swift

Minimal Flux architecture written in Swift.

PROTOCOL

PromiseType

public protocol PromiseType

Properties

result

var result: Result<Element, Swift.Error>?

isIdle

var isIdle: Bool

isPending

var isPending: Bool

isResolved

var isResolved: Bool

isFulfilled

var isFulfilled: Bool

isRejected

var isRejected: Bool

value

var value: Element?

error

var error: Swift.Error?

Methods

resolve(_:)

func resolve(_ result: Result<Element, Swift.Error>?) -> Self?

fulfill(_:)

func fulfill(_ value: Element) -> Self

reject(_:)

func reject(_ error: Swift.Error) -> Self