Enumerations

The following enumerations are available globally.

  • The context in which a Promise body or callback is evaluated.

    Most of these values correspond with Dispatch QoS classes.

    See more

    Declaration

    Swift

    public enum PromiseContext : Equatable, Hashable

Resolver<_,Swift.Error>

  • An error potentially returned from Promise.Resolver.handleCallback(isCancelError:).

    See more

    Declaration

    Swift

    @objc(TWLPromiseCallbackError)
    public enum PromiseCallbackError : Int, Error
  • The result of a resolved promise.

    See more

    Declaration

    Swift

    public enum PromiseResult<Value, Error>
    extension PromiseResult: Equatable where Value: Equatable, Error: Equatable
    extension PromiseResult: Hashable where Value: Hashable, Error: Hashable
    extension PromiseResult: Encodable where Value: Encodable, Error: Encodable
    extension PromiseResult: Decodable where Value: Decodable, Error: Decodable

Equatable

  • NoError is a type that cannot be constructed.

    It’s intended to be used as the error type for promises that cannot return an error. It is similar to Never except it conforms to some protocols in order to make working with types containing it easier.

    See more

    Declaration

    Swift

    public enum NoError : Hashable, Equatable, Codable
  • The error type returned from Promise.timeout.

    See also

    Promise.timeout.
    See more

    Declaration

    Swift

    public enum PromiseTimeoutError<Error> : Swift.Error, CustomNSError
    extension PromiseTimeoutError: Equatable where Error: Equatable
    extension PromiseTimeoutError: Hashable where Error: Hashable