conditional_serde

Crates.ioconditional_serde
lib.rsconditional_serde
version1.0.0
created_at2025-05-03 09:41:24.846775+00
updated_at2025-05-03 09:41:24.846775+00
descriptionDepend on serde if the serde feature is activated
homepage
repositoryhttps://github.com/ISibboI/conditional_serde
max_upload_size
id1658674
size7,057
(ISibboI)

documentation

README

Conditional Serde

Depend on Serialize and Deserialize only if the serde feature is activated.

Ever had to duplicate a full trait definition, just because you wanted some of its type members to conveniently implement Serialize and Deserialize depending on a feature? Worry no more, this crate provides the solution! Simply add a dependency to [ConditionalSerde] to your type member, and activate this crate's serde feature if yours is activated.

Commit count: 2

cargo fmt