Cargo Features

[dependencies]
bump-scope = { version = "0.12.0", default-features = false, features = ["std", "alloc", "panic-on-alloc", "serde", "zerocopy", "nightly-allocator-api", "nightly-coerce-unsized", "nightly-const-refs-to-static", "nightly-exact-size-is-empty", "nightly-trusted-len"] }
default = alloc, panic-on-alloc, std

These default features are set whenever bump-scope is added without default-features = false somewhere in the dependency tree.

std default = alloc

Adds BumpPool and implementations of std::io traits for BumpBox and vectors.

Enables std of allocator-api2

alloc default std

Adds Global as the default base allocator, BumpBox::into_box and some interactions with alloc collections.

Enables alloc of allocator-api2

panic-on-alloc default

Adds functions and traits that will panic when allocations fails. Without this feature, allocation failures cannot cause panics, and only try_-prefixed allocation methods will be available.

Affects bump-scope::private.Infallibly, bump-scope::private.capacity_overflow, bump-scope::private.format_trait_error

serde

Adds Serialize implementations for BumpBox, strings and vectors, and DeserializeSeed for strings and vectors.

Enables serde

zerocopy

Adds alloc_zeroed(_slice), init_zeroed, resize_zeroed and extend_zeroed.

Enables zerocopy

nightly-allocator-api

Nightly features

Enables allocator-api2's nightly feature which makes it reexport the nightly allocator api instead of its own implementation. With this you can bump allocate collections from the standard library.

Enables nightly of allocator-api2

nightly-coerce-unsized

Makes BumpBox<T> implement CoerceUnsized. With this BumpBox<[i32;3]> coerces to BumpBox<[i32]>, BumpBox<dyn Debug> and so on.

nightly-const-refs-to-static

Makes Bump::unallocated a const fn.

nightly-exact-size-is-empty

Implements is_empty manually for some iterators.

nightly-trusted-len

Implements TrustedLen for some iterators.