From the crate index pagecrate index page:
Serde provides a mechanism for low boilerplate serialization & deserialization of values to and from JSON via the serialization API. To be able to serialize a piece of data, it must implement the
serde::Serializeserde::Serializetrait. To be able to deserialize a piece of data, it must implement theserde::Deserializeserde::Deserializetrait. Serde provides provides an annotation to automatically generate the code for these traits:#[derive(Serialize, Deserialize)].
-- Type-based Serialization and DeserializationCreating Json by Serializing Data Structures