smallbox2 0.1.0

Smallbox2 is a stack-preferred Box alternative
Documentation
  • Coverage
  • 18.18%
    2 out of 11 items documented0 out of 0 items with examples
  • Size
  • Source code size: 11.87 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.08 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 9s Average build duration of successful builds.
  • all releases: 9s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Protryon/smallbox2
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Protryon

Stackbox

Stackbox is a stack-preferred Box alternative.

New Boxes

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.

Features

  • std -- default, uses stdlib for global allocator in SmallBox
  • global_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.