encode(to:)

iOS
16+
macOS
13+
tvOS
16+
watchOS
9+
func encode(to encoder: any Encoder) throws