Generally, you won't be using serde directly (beyond using derives from it), but rather one of serializers/deserializers that use serde internally (serde module does have its uses, but they are fairly advanced use cases).
The format you are requesting is CSV, but I decided to make an example using JSON, as its usage is a bit easier. You can try it on http://play.integer32.com. For CSV, see CSV tutorial.
#[derive(Serialize, Deserialize)] allows the structure to be serialized and deserialized using serde formats, like JSON or CSV. That's all what serde is used for here, everything else is done by serde_json. With CSV, everything will be done by csv, and so on.
@xfix Thanks for taking the time to write this simple example as a tutorial !
I'll probably use it when I have to deal with known formats de/serialization.
But my purpose was to implement the serialize() and deserialize() method, using my simple structure. I have a dedicated format I'd like to serialize()/deserialize(). I've tried to understand the examples, but that's not so straightforward.
Serde's architecture makes it so that, even if you're making your own format, you can, and should, still get away with auto-deriving serialize and deserialize, because those trait implementations are shared by every data format (see Serde's data model.)