Closed Marcono1234 closed 3 months ago
At least this seems to be how serde_derive behaves: https://github.com/serde-rs/serde/blob/3f43fca90dfff4a8728765867cea85865843c337/serde_derive/src/ser.rs#L335-L341
Explicitly documenting this makes it easier for custom Serializer implementations to know what to expect from the len value, and makes it clearer for custom Serialize implementations to know what to provide as value.
Serializer
len
Serialize
At least this seems to be how serde_derive behaves: https://github.com/serde-rs/serde/blob/3f43fca90dfff4a8728765867cea85865843c337/serde_derive/src/ser.rs#L335-L341
Explicitly documenting this makes it easier for custom
Serializer
implementations to know what to expect from thelen
value, and makes it clearer for customSerialize
implementations to know what to provide as value.