Skip to content

Commit

Permalink
Added a public init to ImageDownloadResult
Browse files Browse the repository at this point in the history
  • Loading branch information
Kai Maschke committed Jun 29, 2023
1 parent c1f60c6 commit fb08982
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Sources/Networking/ImageDownloader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ public struct ImageLoadingResult {

/// The raw data received from downloader.
public let originalData: Data

/// Creates an `ImageDownloadResult`
///
/// - parameter image: Image of the download result
/// - parameter url: URL from where the image was downloaded from
/// - parameter originalData: The image's binary data
public init(image: KFCrossPlatformImage, url: URL? = nil, originalData: Data) {
self.image = image
self.url = url
self.originalData = originalData
}
}

/// Represents a task of an image downloading process.
Expand Down

0 comments on commit fb08982

Please sign in to comment.