6 releases

✓ Uses Rust 2018 edition

new 0.4.1 Feb 15, 2020
0.4.0 Feb 15, 2020
0.3.3 Oct 5, 2019
0.3.2 Nov 4, 2018
0.3.1 Aug 8, 2018

#48 in Memory management

Download history 12/week @ 2019-11-01 1/week @ 2019-11-08 13/week @ 2019-11-15 4/week @ 2019-11-22 8/week @ 2019-11-29 9/week @ 2019-12-06 114/week @ 2019-12-13 1/week @ 2019-12-20 4/week @ 2019-12-27 1/week @ 2020-01-03 59/week @ 2020-01-10 22/week @ 2020-01-17 1/week @ 2020-01-31 4/week @ 2020-02-07

79 downloads per month

MIT license

1MB
358 lines

A growable, reusable box for Rust.

Build Status

This crate provides a custom Box type with matching API that also allows to reuse the same memory block to store different types with the minimal amount of allocations and is supposed to be used with a pool-based allocator (such as the one provided by this crate).

Notes

The implementation depends on some unstable features:

  1. allocator-api
  2. unsize
  3. coerce-unsized

Things can break randomly and the minimal supported version of rustc will be shifted accordingly. Right now it is rustc 1.43.0-nightly (433aae93e 2020-02-14).


lib.rs:

A growable, reusable box for Rust.

This crate provides a custom Box type with matching API that also allows to reuse the same memory block to store different types with the minimal amount of allocations and is supposed to be used with a pool-based allocator such as GrowablePool.

Notes

This crate uses a lot of ground-breaking features of Rust and therefore is only available on the latest Nightly build.

No runtime deps