aldanor / hdf5-rust

HDF5 for Rust
https://docs.rs/hdf5
Apache License 2.0
310 stars 84 forks source link

Add hdf5 helper attribute with rename functionality #203

Closed ajtribick closed 2 years ago

ajtribick commented 2 years ago

Initial implementation of the helper attribute to allow field renaming. Resolves #201

mulimoen commented 2 years ago

This looks really great. It seems very straight forward to apply the same method to enums too if you change the call signature of extract_field_name to take &[Attribute] and return Option<String>. Feel free to add to the changelog too, this is a very useful feature.

I see this also can be implemented for Fields::Unnamed as we normally map integers as names there.

ajtribick commented 2 years ago

Any further changes needed here?

mulimoen commented 2 years ago

Looks great, thanks for the PR!