Contents

Future.Promise

A type that represents a closure to invoke in the future, when an element or error is available.

Declaration

typealias Promise = (Result<Output, Failure>) -> Void

Mentioned in

Discussion

The promise closure receives one parameter: a Result that contains either a single element published by a Future, or an error.

See Also

Creating a future