Cargo Features

[dependencies]
bump-scope = { version = "0.14.0", default-features = false, features = ["std", "alloc", "panic-on-alloc", "serde", "zerocopy", "nightly-allocator-api", "nightly-coerce-unsized", "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 the allocation fails. Without this feature, allocation failures cannot cause panics, and only try_-prefixed allocation methods will be available.

Affects bump_allocator::BumpAllocator.allocate_layout, bump_allocator::BumpAllocator.allocate_sized, bump_allocator::BumpAllocator.allocate_slice, bump-scope::private.PanicsOnAlloc, bump-scope::private.capacity_overflow, bump-scope::private.format_trait_error, mut_bump_allocator::MutBumpAllocator.prepare_slice_allocation, mut_bump_allocator::MutBumpAllocator.prepare_slice_allocation_rev

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 and hashbrown

nightly-coerce-unsized

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

nightly-exact-size-is-empty

Implements is_empty manually for some iterators.

nightly-trusted-len

Implements TrustedLen for some iterators.