blob: a45edb24274af7ff6827810f4948e8f3deff7ebd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
//
// LoadableState.swift
// tst
//
// Created by Vitaly Takmazov on 10.12.2019.
// Copyright © 2019 com.juick. All rights reserved.
//
import Foundation
enum LoadableState<T> {
case loading
case fetched(Result<T, FetchError>)
}
enum FetchError: Error {
case error(String)
var localizedDescription: String {
switch self {
case .error(let message):
return message
}
}
}
|