Transforming Futures
-
A type-erased wrapper over any future.
Forwards operations to an arbitrary underlying future having the same
Value
type, hiding the specifics of the underlyingFutureProtocol
.This type may be used to:
- Prevent clients from coupling to the specific kind of
FutureProtocol
your implementation is currently using. - Publicly expose only the
FutureProtocol
aspect of a deferred value, ensuring that only your implementation can fill the deferred value using thePromiseProtocol
aspect.
Declaration
Swift
public struct Future<Value> : FutureProtocol
- Prevent clients from coupling to the specific kind of
-
Declaration
Swift
extension Collection where Iterator.Element: FutureProtocol
-
Declaration
Swift
extension Sequence where Iterator.Element: FutureProtocol