Type Aliases

The following type aliases are available globally.

  • The downloading progress block type. The parameter value is the receivedSize of current response. The second parameter is the total expected data length from response’s Content-Length header. If the expected length is not available, this block will not be called.

    Declaration

    Swift

    public typealias DownloadProgressBlock = ((_ receivedSize: Int64, _ totalSize: Int64) -> Void)
  • Represents the type of transformer method, which will be used in to provide a Filter.

    Declaration

    Swift

    public typealias Transformer = (CIImage) -> CIImage?
  • Progress update block of prefetcher when initialized with a list of resources.

    • skippedResources: An array of resources that are already cached before the prefetching starting.
    • failedResources: An array of resources that fail to be downloaded. It could because of being cancelled while downloading, encountered an error when downloading or the download not being started at all.
    • completedResources: An array of resources that are downloaded and cached successfully.

    Declaration

    Swift

    public typealias PrefetcherProgressBlock = ((_ skippedResources: [Resource], _ failedResources: [Resource], _ completedResources: [Resource]) -> Void)
  • Progress update block of prefetcher when initialized with a list of resources.

    • skippedSources: An array of sources that are already cached before the prefetching starting.
    • failedSources: An array of sources that fail to be fetched.
    • completedResources: An array of sources that are fetched and cached successfully.

    Declaration

    Swift

    public typealias PrefetcherSourceProgressBlock = ((_ skippedSources: [Source], _ failedSources: [Source], _ completedSources: [Source]) -> Void)
  • Completion block of prefetcher when initialized with a list of sources.

    • skippedResources: An array of resources that are already cached before the prefetching starting.
    • failedResources: An array of resources that fail to be downloaded. It could because of being cancelled while downloading, encountered an error when downloading or the download not being started at all.
    • completedResources: An array of resources that are downloaded and cached successfully.

    Declaration

    Swift

    public typealias PrefetcherCompletionHandler = ((_ skippedResources: [Resource], _ failedResources: [Resource], _ completedResources: [Resource]) -> Void)
  • Completion block of prefetcher when initialized with a list of sources.

    • skippedSources: An array of sources that are already cached before the prefetching starting.
    • failedSources: An array of sources that fail to be fetched.
    • completedSources: An array of sources that are fetched and cached successfully.

    Declaration

    Swift

    public typealias PrefetcherSourceCompletionHandler = ((_ skippedSources: [Source], _ failedSources: [Source], _ completedSources: [Source]) -> Void)