Implemented _CSVEncoder container methods

This commit is contained in:
Caleb Kleveter 2018-05-07 13:37:19 -05:00
parent 046ed46a7e
commit 3a31fce01d
No known key found for this signature in database
GPG Key ID: 30A5A6F3A0ED7EDA
1 changed files with 4 additions and 3 deletions

View File

@ -22,15 +22,16 @@ final class _CSVEncoder: Encoder {
}
func container<Key>(keyedBy type: Key.Type) -> KeyedEncodingContainer<Key> where Key : CodingKey {
fatalError()
let container = _CSVKeyedEncoder<Key>(container: self.data, path: self.codingPath, boolEncoding: self.boolEncoding, stringEncoding: self.stringEncoding)
return KeyedEncodingContainer(container)
}
func unkeyedContainer() -> UnkeyedEncodingContainer {
fatalError()
return _CSVUnkeyedEncoder(container: self.data, path: self.codingPath, boolEncoding: self.boolEncoding, stringEncoding: self.stringEncoding)
}
func singleValueContainer() -> SingleValueEncodingContainer {
fatalError()
return _CSVSingleValueEncoder(container: self.data, path: self.codingPath, boolEncoding: self.boolEncoding, stringEncoding: self.stringEncoding)
}
static func encode<T>(_ objects: [T])throws -> Data where T: Encodable {