Kingfisher Documentation

Structure Raw​Image​Data​Provider

public struct RawImageDataProvider: ImageDataProvider  

Represents an image data provider for a raw data object.

%265 RawImageDataProvider RawImageDataProvider ImageDataProvider ImageDataProvider RawImageDataProvider->ImageDataProvider

Conforms To

ImageDataProvider

Represents a data provider to provide image data to Kingfisher when setting with Source.provider source. Compared to Source.network member, it gives a chance to load some image data in your own way, as long as you can provide the data representation for the image.

Initializers

init(data:​cache​Key:​)

public init(data: Data, cacheKey: String)  

Creates an image data provider by the given raw data value and a cacheKey be used in Kingfisher cache.

Parameters

data Data

The raw data reprensents an image.

cache​Key String

The key is used for caching the image data. You need a different key for any different image.

Properties

data

public let data: Data

The raw data object to provide to Kingfisher image loader.

cache​Key

public var cacheKey: String

The key used in cache.

Methods

data(handler:​)

public func data(handler: @escaping (Result<Data, Error>) -> Void)