Structures

The following structures are available globally.

  • Resource describes a remote resource of generic type. The type can be fetched via HTTP(S) and parsed into the coresponding model object.

    Example:

    let request: URLRequest = //
    let resource: Resource<String?> = Resource(request: request, parse: { data in
       String(data: data, encoding: .utf8)
    })
    
    See more

    Declaration

    Swift

    public struct Resource<Model>