Serde Unit Struct Derive
This crate provides derive macros for Serde's Serialize and Deserialize traits on unit structs, such that the unit struct is represented by its name as a string.
This is useful if you wish to maintain type information, i.e. differentiate between different unit structs.
Without serde_unit_struct:
use ;
;
;
With serde_unit_struct:
use ;
;
;
Deserialize_unit_struct can accept aliases set via #[serde_unit_struct(alias = "...")].
Multiple aliases may be specified.
Aliases only affect deserialization; serialization always uses the struct name.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.