Resource
public protocol Resource
Represents an image resource at a certain url and a given cache key.
Kingfisher will use a Resource
to download a resource from network and cache it with the cache key when
using Source.network
as its image setting source.
-
The key used in cache.
Declaration
Swift
var cacheKey: String { get }
-
The target image URL.
Declaration
Swift
var downloadURL: URL { get }
-
convertToSource()
Extension methodConverts
self
to a validSource
based on itsdownloadURL
scheme. A.provider
withLocalFileImageDataProvider
associated will be returned if the URL points to a local file. Otherwise,.network
is returned.Declaration
Swift
public func convertToSource() -> Source