Closed hyumo closed 5 months ago
Hey, thank you for the suggestion. I made a PR in which I added the derive macros for all scalar dual numbers. Do you need vector dual numbers as well? That would be a bit more complicated.
Can you test whether the version in the PR works for your problem? You will need to activate the serde
feature to use it
num-dual = { git = "https://github.com/itt-ustutt/num-dual", branch = "serde", features = ["serde"] }
yep, just tested, it's working for me now.
feel free to close the issue once merged
Hi, thanks for this nice lib! Here's a feature request, feel free to close the issue if it's not viable.
Is it possible to add Serde serialization feature to all the Dual number structs?
This would help store data to file, and pass data through network, I am using another crate that requires the
Serialize
andDeserialize
trait. I was suggested to implement my own wrapper struct ontonum-dual
structs in such cases, but I think it's better to have it withinnum-dual
, otherwise, I have to reimplement all the operator overloadings. Not sure if this makes sense, correct me if there are other better ways to achieve this.Thx