28 lines
656 B
Swift
28 lines
656 B
Swift
|
public extension Profile {
|
||
|
struct Content: Hashable {
|
||
|
public let elements: Elements
|
||
|
public let numbers: Numbers
|
||
|
|
||
|
public init(elements: Profile.Content.Elements, numbers: Profile.Content.Numbers) {
|
||
|
self.elements = elements
|
||
|
self.numbers = numbers
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
extension Profile.Content {
|
||
|
struct CodingData: Codable {
|
||
|
let content: Elements.CodingData
|
||
|
let counts: Numbers.CodingData
|
||
|
}
|
||
|
}
|
||
|
|
||
|
extension Profile.Content.CodingData {
|
||
|
var decoded: Profile.Content {
|
||
|
.init(
|
||
|
elements: content.decoded,
|
||
|
numbers: counts.decoded
|
||
|
)
|
||
|
}
|
||
|
}
|