Collection

extension Collection where Iterator.Element: FutureProtocol
  • Composes a number of futures into a single deferred array.

    Declaration

    Swift

    public func allFilled() -> Future<[Iterator.Element.Value]>
  • Compose a number of tasks into a single array.

    If any of the contained tasks fail, the returned task will be determined with that failure. Otherwise, once all operations succeed, the returned task will be fulfilled by combining the values.

    Declaration

    Swift

    public func allSucceeded() -> Task<[Element.Success]>
  • Compose a number of tasks into a single array.

    If any of the contained tasks fail, the returned task will be determined with that failure. Otherwise, once all operations succeed, the returned task will be determined a success.

    Declaration

    Swift

    public func allSucceeded() -> Task<Void>