Protocolswift 6.0.1Swift
Encoder
A type that can encode values into a native format for external representation.
protocol Encoder
Browse conforming typesA type that can encode values into a native format for external representation.
protocol Encoder
import Swift
var codingPath: [any CodingKey] { get }
The path of coding keys taken to get to this point in encoding.
var userInfo: [CodingUserInfoKey : Any] { get }
Any contextual information set by the user for encoding.
func container<Key>(keyedBy type: Key.Type) -> KeyedEncodingContainer<Key> where Key : CodingKey
Returns an encoding container appropriate for holding multiple values keyed by the given key type.
func singleValueContainer() -> any SingleValueEncodingContainer
Returns an encoding container appropriate for holding a single primitive value.
func unkeyedContainer() -> any UnkeyedEncodingContainer
Returns an encoding container appropriate for holding multiple unkeyed values.
import Testing
Create and run tests for your Swift packages and Xcode projects.
var testParameter: Test.Parameter? { get }
The test parameter which the test argument being encoded was passed to, if any.