encode(to:)

iOS
17+
macOS
14+
tvOS
17+
watchOS
10+
func encode(to encoder: any Encoder) throws