encode(to:)

iOS
16.4+
macOS
13.3+
tvOS
16.4+
watchOS
9.4+
func encode(to encoder: any Encoder) throws