Structureswift 6.0.3Swift
KeyedEncodingContainer
A concrete container that provides a view into an encoder’s storage, making the encoded properties of an encodable type accessible by keys.
struct KeyedEncodingContainer<K> where K : CodingKey
A concrete container that provides a view into an encoder’s storage, making the encoded properties of an encodable type accessible by keys.
struct KeyedEncodingContainer<K> where K : CodingKey
import Swift
protocol CodingKey : CustomDebugStringConvertible, CustomStringConvertible, Sendable
A type that can be used as a key for encoding and decoding.
protocol KeyedEncodingContainerProtocol
A type that provides a view into an encoder’s storage and is used to hold the encoded properties of an encodable type in a keyed manner.
init<Container>(_ container: Container) where K == Container.Key, Container : KeyedEncodingContainerProtocol
Creates a new instance with the given container.
var codingPath: [any CodingKey] { get }
mutating func encode(_ value: String, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encode(_ value: Bool, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encode(_ value: Double, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encode(_ value: Float, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encode(_ value: Int, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encode(_ value: UInt, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encode<T>(_ value: T, forKey key: KeyedEncodingContainer<K>.Key) throws where T : Encodable
mutating func encode(_ value: Int8, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encode(_ value: Int16, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encode(_ value: Int32, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encode(_ value: Int64, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encode(_ value: UInt8, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encode(_ value: Int128, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encode(_ value: UInt16, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encode(_ value: UInt32, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encode(_ value: UInt64, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encode(_ value: UInt128, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encodeConditional<T>(_ object: T, forKey key: KeyedEncodingContainer<K>.Key) throws where T : AnyObject, T : Encodable
mutating func encodeIfPresent(_ value: String?, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encodeIfPresent(_ value: Bool?, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encodeIfPresent(_ value: Double?, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encodeIfPresent(_ value: Float?, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encodeIfPresent(_ value: Int?, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encodeIfPresent(_ value: UInt?, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encodeIfPresent<T>(_ value: T?, forKey key: KeyedEncodingContainer<K>.Key) throws where T : Encodable
mutating func encodeIfPresent(_ value: Int8?, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encodeIfPresent(_ value: Int16?, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encodeIfPresent(_ value: Int32?, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encodeIfPresent(_ value: Int64?, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encodeIfPresent(_ value: UInt8?, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encodeIfPresent(_ value: Int128?, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encodeIfPresent(_ value: UInt16?, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encodeIfPresent(_ value: UInt32?, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encodeIfPresent(_ value: UInt64?, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encodeIfPresent(_ value: UInt128?, forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func encodeNil(forKey key: KeyedEncodingContainer<K>.Key) throws
mutating func nestedContainer<NestedKey>(keyedBy keyType: NestedKey.Type, forKey key: KeyedEncodingContainer<K>.Key) -> KeyedEncodingContainer<NestedKey> where NestedKey : CodingKey
mutating func nestedUnkeyedContainer(forKey key: KeyedEncodingContainer<K>.Key) -> any UnkeyedEncodingContainer
mutating func superEncoder() -> any Encoder
mutating func superEncoder(forKey key: KeyedEncodingContainer<K>.Key) -> any Encoder
typealias Key = K
mutating func encode(_ value: Int128, forKey key: Self.Key) throws
mutating func encode(_ value: UInt128, forKey key: Self.Key) throws
mutating func encodeConditional<T>(_ object: T, forKey key: Self.Key) throws where T : AnyObject, T : Encodable
mutating func encodeIfPresent(_ value: String?, forKey key: Self.Key) throws
mutating func encodeIfPresent(_ value: Bool?, forKey key: Self.Key) throws
mutating func encodeIfPresent(_ value: Double?, forKey key: Self.Key) throws
mutating func encodeIfPresent(_ value: Float?, forKey key: Self.Key) throws
mutating func encodeIfPresent(_ value: Int?, forKey key: Self.Key) throws
mutating func encodeIfPresent(_ value: UInt?, forKey key: Self.Key) throws
mutating func encodeIfPresent<T>(_ value: T?, forKey key: Self.Key) throws where T : Encodable
mutating func encodeIfPresent(_ value: Int8?, forKey key: Self.Key) throws
mutating func encodeIfPresent(_ value: Int16?, forKey key: Self.Key) throws
mutating func encodeIfPresent(_ value: Int32?, forKey key: Self.Key) throws
mutating func encodeIfPresent(_ value: Int64?, forKey key: Self.Key) throws
mutating func encodeIfPresent(_ value: UInt8?, forKey key: Self.Key) throws
mutating func encodeIfPresent(_ value: Int128?, forKey key: Self.Key) throws
mutating func encodeIfPresent(_ value: UInt16?, forKey key: Self.Key) throws
mutating func encodeIfPresent(_ value: UInt32?, forKey key: Self.Key) throws
mutating func encodeIfPresent(_ value: UInt64?, forKey key: Self.Key) throws
mutating func encodeIfPresent(_ value: UInt128?, forKey key: Self.Key) throws
import FoundationEssentials
mutating func encode<T, C>(_ wrapper: CodableConfiguration<T?, C>, forKey key: KeyedEncodingContainer<K>.Key) throws where T : DecodableWithConfiguration, T : EncodableWithConfiguration, C : DecodingConfigurationProviding, C : EncodingConfigurationProviding, T.DecodingConfiguration == C.DecodingConfiguration, T.EncodingConfiguration == C.EncodingConfiguration
mutating func encode<T>(_ t: T, forKey key: KeyedEncodingContainer<K>.Key, configuration: T.EncodingConfiguration) throws where T : EncodableWithConfiguration
mutating func encode<T, C>(_ t: T, forKey key: KeyedEncodingContainer<K>.Key, configuration: C.Type) throws where T : EncodableWithConfiguration, C : EncodingConfigurationProviding, T.EncodingConfiguration == C.EncodingConfiguration
mutating func encodeIfPresent<T>(_ t: T?, forKey key: KeyedEncodingContainer<K>.Key, configuration: T.EncodingConfiguration) throws where T : EncodableWithConfiguration
mutating func encodeIfPresent<T, C>(_ t: T?, forKey key: KeyedEncodingContainer<K>.Key, configuration: C.Type) throws where T : EncodableWithConfiguration, C : EncodingConfigurationProviding, T.EncodingConfiguration == C.EncodingConfiguration
import BSON
mutating func encodeBSONPrimitive(_ value: Primitive?, forKey key: Key) throws