Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/worldsender/untyped-box

A heap allocation utility when the datatype is unknown.
https://github.com/worldsender/untyped-box

Last synced: about 2 months ago
JSON representation

A heap allocation utility when the datatype is unknown.

Awesome Lists containing this project

README

        

# untyped-box

A `Box` 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.