Hacker News new | past | comments | ask | show | jobs | submit login

I don't think the ownership system gives you that directly. But I think you could make a trait with a #[derive] macro which could add up the owned memory of an object. And for complex objects, recursively calculate the owned memory for all of an object's fields.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: