3 ms·
Another example: https://crates.io/crates/deepsize https://crates.io/crates/deepsize You can implement that for your types. Deepsize crate implements the trait
by ithkuil 3y ago
Another example: https://crates.io/crates/deepsize https://crates.io/crates/deepsize
You can implement that for your types.
Deepsize crate implements the trait for a few popular libraries.
You can derive the trait in your structures and it will work for the few structures that happen to contain only your structures and the few hand picked structures supported by the deepsize crate.
And then? What about the 99% of the other cases? Adding a trait impl is acceptable. Wrapping all the other types not much