Skip to content

Instantly share code, notes, and snippets.

import UIKit
enum ImageFetchingError: Error {
case timeout
case unknown
}
protocol CatImageCellModel {
var placeholderImage: UIImage { get }
func fetchCatImage(completion: @escaping (Result<UIImage, ImageFetchingError>) -> Void)