Right now, make_bitfield_serde defaults fields if they are missing.
But make_accessors--which is the pendant for structs that aren't bitfields-- does not default anything if a value for the respective field is missing in the json5 configuration. Instead, it's possible to specify attributes (such as #[serde(default)]) on the serde field.
make_bitfield_serde should be adapted to implement the same language and semantics in this respect that make_accessors already does.
Right now, make_bitfield_serde defaults fields if they are missing.
But
make_accessors
--which is the pendant for structs that aren't bitfields-- does not default anything if a value for the respective field is missing in the json5 configuration. Instead, it's possible to specify attributes (such as#[serde(default)]
) on the serde field.make_bitfield_serde
should be adapted to implement the same language and semantics in this respect thatmake_accessors
already does.