Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/worldsender/untyped-box
- Owner: WorldSEnder
- License: apache-2.0
- Created: 2024-12-14T16:31:25.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2024-12-14T16:51:01.000Z (about 2 months ago)
- Last Synced: 2024-12-14T17:27:30.529Z (about 2 months ago)
- Language: Rust
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
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.