Supporting Files

Specialized Cursors

  • A type-erased cursor of Element.

    This cursor forwards its next() method to an arbitrary underlying cursor having the same Element type, hiding the specifics of the underlying cursor.

    See more

    Declaration

    Swift

    public final class AnyCursor<Element> : Cursor
  • Declaration

    Swift

    public struct APIHelper
  • Declaration

    Swift

    open class CodableHelper

Cursor

  • A type that supplies the values of some external resource, one at a time.

    Overview

    The most common way to iterate over the elements of a cursor is to use a while loop:

    let cursor = ...
    while let element = try cursor.next() {
        ...
    }
    

    Relationship with standard Sequence and IteratorProtocol

    Cursors share traits with lazy sequences and iterators from the Swift standard library. Differences are:

    • Cursor types are classes, and have a lifetime.
    • Cursor iteration may throw errors.
    • A cursor can not be repeated.

    The protocol comes with default implementations for many operations similar to those defined by Swift’s Sequence protocol: contains, dropFirst, dropLast, drop(while:), enumerated, filter, first, flatMap, forEach, joined, joined(separator:), max, max(by:), min, min(by:), map, prefix, prefix(while:), reduce, reduce(into:), suffix.

    See more

    Declaration

    Swift

    public protocol Cursor : AnyObject
  • Declaration

    Swift

    public enum DecodableRequestBuilderError : Error
  • Declaration

    Swift

    public enum DownloadException : Error
  • Declaration

    Swift

    public enum HTTPMethod : String
  • Declaration

    Swift

    public struct JSONDataEncoding
    extension JSONDataEncoding: ParameterEncoding
  • Declaration

    Swift

    open class JSONEncodingHelper
  • Declaration

    Swift

    extension KeyedDecodingContainerProtocol
  • Declaration

    Swift

    extension KeyedEncodingContainerProtocol
  • Declaration

    Swift

    public class OpenISO8601DateFormatter : DateFormatter
  • Declaration

    Swift

    public protocol ParameterEncoding
  • Declaration

    Swift

    open class Response<T>
  • Declaration

    Swift

    extension String: CodingKey