Browse Source

Update readme

master
kageru 1 year ago
parent
commit
e12ae75e73
Signed by: kageru GPG Key ID: 8282A2BEA4ADA3D2
  1. 2
      LICENSE
  2. 26
      README.md

2
LICENSE

@ -1,4 +1,4 @@
MIT License Copyright (c) <year> <copyright holders>
MIT License Copyright (c) 2020 kageru <kageru@kageru.moe>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

26
README.md

@ -1,3 +1,27 @@
# mparsed
A serde parser for MPD responses. Includes mpd structs.
A serde parser for MPD responses. Includes mpd structs.
## Why?
Because there are lots of mpd client libraries for Rust,
but most (maybe all?) of them write the same awful deserialization code
that more or less looks like this:
```rs
let mut track = Track::default();
match key {
"title" => track.title = value,
"artist" => track.artist = value,
"album" => track.album = value,
...
```
And I figured just having a small crate that has all the types and does the serde magic for you would be nice for other people as well.
Oh, and it’s a good learning opportunity for me.
Serde seemed like a library I should learn more about.
### You’re missing `MyFavoriteStruct`!
Feel free to submit a PR for it.
This is still very much work in progress,
but I think we should have most necessary helper functions so that you can just write the struct definition with some serde attributes and be done with it.

Loading…
Cancel
Save