| Crates.io | smallbox2 |
| lib.rs | smallbox2 |
| version | 0.1.0 |
| created_at | 2021-09-17 17:50:08.531309+00 |
| updated_at | 2021-09-17 17:50:08.531309+00 |
| description | Smallbox2 is a stack-preferred Box alternative |
| homepage | |
| repository | https://github.com/Protryon/smallbox2 |
| max_upload_size | |
| id | 452897 |
| size | 12,187 |
Stackbox is a stack-preferred Box alternative.
There are two available types, SmallBox and StackBox. Both take an inner type like Box and an additional const-generic parameter signifying the maximum stack size.
Convenience types such as SmallBox32 and StackBox32 are provided.
The difference between SmallBox and StackBox is that StackBox will not fall back to the heap, but SmallBox will. StackBox panics if ifs size is overflowed.
std -- default, uses stdlib for global allocator in SmallBoxglobal_alloc_fill -- if not using std, this feature will allow SmallBox to directly hook into the global allocator. If neither this feature or std are enabled, only StackBox is available.