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
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 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 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
- nightly-coerce-unsized
-
Makes
BumpBox<T>
implementCoerceUnsized
. With thisBumpBox<[i32;3]>
coerces toBumpBox<[i32]>
,BumpBox<dyn Debug>
and so on. - nightly-const-refs-to-static
-
Makes
Bump::unallocated
aconst fn
. - nightly-exact-size-is-empty
-
Implements
is_empty
manually for some iterators. - nightly-trusted-len
-
Implements
TrustedLen
for some iterators.