EXTENSION
Promise
Properties
isIdle
var isIdle: Bool
- Returns:
true
if the promise has not yet resolved nor pending.
isPending
var isPending: Bool
- Returns:
true
if the promise has not yet resolved.
isCompleted
var isCompleted: Bool
- Returns:
true
if the promise has completed.
isResolved
var isResolved: Bool
- Returns:
true
if the promise has resolved.
isFulfilled
var isFulfilled: Bool
- Returns:
true
if the promise was fulfilled.
isRejected
var isRejected: Bool
- Returns:
true
if the promise was rejected.
value
var value: T?
- Returns: The value with which this promise was fulfilled or
nil
if this promise is pending or rejected.
error
var error: Swift.Error?
- Returns: The error with which this promise was rejected or
nil
if this promise is pending or fulfilled.
Methods
init()
public convenience init()
empty()
public static func empty() -> Promise<T>
==(_:_:)
public static func == (lhs: Promise<T>, rhs: Promise<T>) -> Bool
Parameters
Name | Description |
---|---|
lhs | A value to compare. |
rhs | Another value to compare. |
==(_:_:)
public static func == (lhs: Promise<T>, rhs: Promise<T>) -> Bool
notify(to:)
func notify<T: StoreType>(to store: T)