2 unstable releases

new 0.2.0 Jan 12, 2025
0.1.0 Dec 19, 2024

#216 in Memory management

Download history 112/week @ 2024-12-18 125/week @ 2025-01-08

237 downloads per month

MIT/Apache

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 for Box and Vec types in std.

Dependencies

~265KB