Cargo Features
[dependencies]
packed_struct = { version = "0.10.1", default-features = false, features = ["std", "alloc", "byte_types_256", "use_serde"] }
- default = std
-
The
std
feature is set by default wheneverpacked_struct
is added without
somewhere in the dependency tree.default-features = false - std default
-
Enables std of packed_struct_codegen and serde
serde:
Provide impls for common standard library types like Vec<T> and HashMap<K, V>.
Requires a dependency on the Rust standard library.Affects
internal_prelude::v1
,debug_fmt::PackedStructDebug
,packed_struct::debug_fmt
,packing::PackedStructSlice.pack_to_vec
,primitive_enum::PrimitiveEnumDynamicStr
… - alloc
-
Enables alloc of packed_struct_codegen
Affects
debug_fmt::PackedStructDebug
,packed_struct::debug_fmt
,packing::PackedStructSlice.pack_to_vec
,primitive_enum::PrimitiveEnumDynamicStr
… - byte_types_64 byte_types_256
- use_serde = serde, serde_derive
Features from optional dependencies
In crates that don't use the dep:
syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.