2 unstable releases
new 0.2.0 | Jan 12, 2025 |
---|---|
0.1.0 | Dec 19, 2024 |
#216 in Memory management
237 downloads per month
34KB
534 lines
untyped-box
A Box<T>
represents a heap allocation of a value of type T
. This crate provides an untyped heap allocation type Allocation
.
This is useful to avoid monomorphizations on T
, share code paths going through the allocator, while upholding safety invariants.
The allocator contract of the unsafe
allocation methods is quite strict and easy to misuse.
This primitive can be used as a safe layer on top to avoid dealing with the allocation methods directly.
lib.rs
:
Available features
nightly-std-conversions
: Requires nightly and enables additional conversions forBox
andVec
types in std.
Dependencies
~265KB