Re:Things Rust shipped without
by wyager on Friday July 03, 2015 @06:52PM
(#9828342)
How do you imagine that reflection would be useful for serialization in Rust?
[ Parent
| on HN ]
In the way I asked here, http://stackoverflow.com/questions/29109967/why-dont-many-co...
I am not very familiar with rust, is what I was describing currently possible?
It's not possible, but there's also no good reason to do it. You might as well just make an e.g. Serializable trait that requires you to manually implement the serialize function. You're not saving a whole lot of work by looping through the object's fields and saving them. Most objects only have a few fields to serialize anyway.