Rust MSDParser
This is a port of the MSD Parser library by Garcia to Rust. This library exposes APIs similar to its Python origin, namely the parse_msd function.
;
The returned struct is an iterator that yields Result<MSDParameter, MSDParserError>, where MSDParameter is a key-value pair. The keys and values can be accessed by using .key() and .value() respectively.
See example below to get an idea of how it works.
Usage
use ;
use Error;
use Vec;
let example_input = b"\
#VERSION:0.83;
#TITLE:Springtime;
#SUBTITLE:;
#ARTIST:Kommisar;";
let mut result: = Vecnew;
// here we set `escapes` to true and `ignore_stray_text` to false
// which is the default value in the original python library
for parameter in parse_msd
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
Installation
- Add the following to your
Cargo.toml:
[]
= { = "0.1.0", = "https://github.com/smdbs01/rust_msdparser.git" }
Or
- Use
Cargo add msdparser.
Contribute
This is my first project using Rust, so it is very likely that the codebase is not "rusty" enough. So, if you find any bugs or suggestions, please feel free to open an issue or PR.