4 ms·
> A box is a pointer AND the storage at the same time. That's just the way you decide to see it. Most people don't, in fact the actual documentation is quite d
by remram 3y ago
> A box is a pointer AND the storage at the same time.
That's just the way you decide to see it. Most people don't, in fact the actual documentation is quite different:
>> A pointer type that uniquely owns a heap allocation of type T.
This explicitly describes it as a pointer, pointing to a single allocation.
https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html