Future

public class Future<S> : Completing

Future is a proxy of value that will be available at some point in the future.

  • Flattens two nested futures

    Declaration

    Swift

    func flatten() -> Future<S.Success>

    Return Value

    flattened future

  • Flattens channel nested in future

    Declaration

    Swift

    func flatten() -> Channel<S.Update, S.Success>

    Return Value

    flattened future

  • Makes completed future

    Declaration

    Swift

    static func completed(_ completion: Fallible<Success>) -> Future<Success>
  • Makes succeeded future

    Declaration

    Swift

    static func succeeded(_ success: Success) -> Future<Success>
  • Makes succeeded future

    Declaration

    Swift

    static func just(_ success: Success) -> Future<Success>
  • Makes failed future

    Declaration

    Swift

    static func failed(_ failure: Swift.Error) -> Future<Success>
  • Makes cancelled (failed with AsyncNinjaError.cancelled) future

    Declaration

    Swift

    static var cancelled: Future<Success> { get }