Cargo Features
[dependencies]
serde_state = { version = "0.4.8", default-features = false, features = ["derive", "std", "unstable", "alloc", "rc", "playground"] }
FEATURES
- default = std
-
The
std
feature is set by default wheneverserde_state
is added without
somewhere in the dependency tree.default-features = false - derive = serde_derive
-
Re-export the derive(Serialize, Deserialize) macros. This is specifically intended for library crates that provide optional Serde impls behind a Cargo cfg of their own. All other crates should depend on serde_derive directly.
Please refer to the long comment above the line
pub use serde_derive::*
in src/lib.rs before enabling this feature. If you think you need this feature and your use case does not precisely match the one described in the comment, please open an issue to let us know about your use case. - std default
-
Provide impls for common standard library types like Vec<T> and HashMap<K, V>.
Requires a dependency on the Rust standard library.Affects
de::borrow_cow_str
,de::borrow_cow_bytes
… - unstable alloc?
-
Provide impls for types that require unstable functionality. For tracking and discussion of unstable functionality please refer to this issue:
- alloc = unstable
-
Provide impls for types that require memory allocation like Box<T> and Rc<T>. This is a subset of std but may be enabled without depending on all of std.
Requires a dependency on the unstable core allocation library:
Affects
de::borrow_cow_str
,de::borrow_cow_bytes
… - rc
-
Opt into impls for Rc<T> and Arc<T>. Serializing and deserializing these types does not preserve identity and may result in multiple copies of the same data.
Be sure that this is what you want before enabling this feature. - playground = serde_derive
-
Get serde_derive picked up by the Integer 32 playground. Not public API.
http://play.integer32.com/
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.