Functions

The following functions are available globally.

  • API to get current version of this library

    Declaration

    Swift

    public func version() -> String
  • Binary Operator to compose one closure with another. Kleisi Composition. Let g: A => B and f: B => C. f compose g is A => C.

    Declaration

    Swift

    public func => <Input, InterimOutput, Output>(lhs: BlockWithCompletion<Input, InterimOutput>, rhs: BlockWithCompletion<InterimOutput, Output>) -> BlockWithCompletion<Input, Output>
  • API to retry the failed requests.

    Declaration

    Swift

    public func taskWithRetryOnNetworkFailure<T>(attempts: Int, delay: Double, task: @escaping (_ completion: @escaping (Result<T, Error>) -> Void) -> Void, completion: @escaping (Result<T, Error>) -> Void)
  • Undocumented

    Declaration

    Swift

    public func dispatchAsyncToMainThreadIfNeeded(_ block: @escaping () -> Void)
  • Undocumented

    Declaration

    Swift

    public func randomUUIDString() -> String
  • Undocumented

    Declaration

    Swift

    public func decodeDictionaryToDecodable<T>(_ dictionary: [String : Any], to type: T.Type) throws -> T where T : Decodable