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
somewhere in the dependency tree.default-features = false - std default = alloc
-
Adds
BumpPool
and implementations ofstd::io
traits forBumpBox
and vectors.Enables std of allocator-api2
- alloc default std
-
Adds
Global
as the default base allocator,BumpBox::into_box
and some interactions withalloc
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 forBumpBox
, strings and vectors, andDeserializeSeed
for strings and vectors.Enables serde
- zerocopy
-
Adds
alloc_zeroed(_slice)
,init_zeroed
,resize_zeroed
andextend_zeroed
.Enables zerocopy
- nightly-allocator-api
-
Nightly features
Enables
allocator-api2
'snightly
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>
implementCoerceUnsized
. With thisBumpBox<[i32;3]>
coerces toBumpBox<[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.