mirror of
https://github.com/mii443/AzooKeyKanaKanjiConverter.git
synced 2025-08-22 15:05:26 +00:00
19 lines
503 B
Swift
19 lines
503 B
Swift
//
|
|
// CodableSupport.swift
|
|
// azooKey
|
|
//
|
|
// Created by ensan on 2021/03/17.
|
|
// Copyright © 2021 ensan. All rights reserved.
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public extension Encodable {
|
|
/// Encodes this value into the given container.
|
|
/// - Parameters:
|
|
/// - container: The container to encode this value into.
|
|
func containerEncode<CodingKeys: CodingKey>(container: inout KeyedEncodingContainer<CodingKeys>, key: CodingKeys) throws {
|
|
try container.encode(self, forKey: key)
|
|
}
|
|
}
|