Transforming Futures
-
A type-erased wrapper over any future.
Forwards operations to an arbitrary underlying future having the same
Valuetype, hiding the specifics of the underlyingFutureProtocol.This type may be used to:
- Prevent clients from coupling to the specific kind of
FutureProtocolyour implementation is currently using. - Publicly expose only the
FutureProtocolaspect of a deferred value, ensuring that only your implementation can fill the deferred value using thePromiseProtocolaspect.
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
View on GitHub
Install in Dash
Transforming Futures Reference