News for hackers. Stuff that matters.
Re:Untapped potential in Rust's type system by josephg on Monday June 14, 2021 @08:16AM (#27501690)
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.

There are no comments on this comment yet.